new Betslip()
- Source:
Properties:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
Extends
Members
combinations :Array.<string>
- Source:
Array of number of bets per combination
Type:
- Array.<string>
combinationTypes :Array.<string>
- Source:
Array of combination inputs label
Type:
- Array.<string>
setup :object
- Source:
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
totalStake |
number |
<optional> |
0
|
|
potWinMax |
number |
<optional> |
0
|
|
potWinMin |
number |
<optional> |
0
|
|
bonusAmt |
number |
<optional> |
0
|
Initial setup for calculations
Type:
- object
state :object
- Source:
Properties:
| Name | Type | Description |
|---|---|---|
type |
string | Indicate one of bet type |
numOfSplitBets |
number | Number of split bets |
maxOdd |
Array | Array of all maximum odds per combination. For split bet only one odd |
minOdd |
Array | Array of all minimum odds per combination. For split bet only one odd |
maxPotWin |
Array | Array of all maximum potential win per combination. For split bet only one odd |
minPotWin |
Array | Array of all minimum potential win combination. For split bet only one odd |
minStakeErr |
boolean | Is all inserted stakes bigger than minimum stake |
maxStakeErr |
boolean | Is all inserted stakes less than minimum stake |
stakeInFocus |
number | Index of input field in focus |
rerender |
boolean | Forse rerender |
showButtons |
boolean | Indicate are stake buttons showen |
openNewPlacedBetsModal |
boolean | Indicate is confirmation modal showen |
systemManager |
object | Precalculated data from library |
settings |
object | Settings for calculations |
Type:
- object
Methods
addButton(e) → {void}
- Source:
- Overrides:
Change stake value by clicking on stake buttons
Parameters:
| Name | Type | Description |
|---|---|---|
e |
Event |
Returns:
- Type
- void
calcForStakes(stake, bonusOddMax, bonusOddMin, numOfBets, manager, minStake, isArray) → {object}
- Source:
- Overrides:
Calculate settings for selected bet type
Parameters:
| Name | Type | Description |
|---|---|---|
stake |
number | Array | |
bonusOddMax |
number | Array | |
bonusOddMin |
number | Array | |
numOfBets |
number | null | Array | |
manager |
object | null | |
minStake |
number | |
isArray |
boolean |
Returns:
Settings (total stake, potential win (min/max), bonus amount)
- Type
- object
changeBetType(betTypeopt, isDeletingopt) → {void}
- Source:
- Overrides:
Change tab from bottom navigation
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
betType |
string |
<optional> |
|
isDeleting |
boolean |
<optional> |
Returns:
- Type
- void
changeStakeInput(e) → {void}
- Source:
- Overrides:
Change stake value inserted in input
Parameters:
| Name | Type | Description |
|---|---|---|
e |
Event |
Returns:
- Type
- void
checkError() → {boolean}
- Source:
- Overrides:
Validate inputs fields before placebet action
Returns:
- Type
- boolean
checkMaximumWinningPayoutErr(potWinMax) → {boolean}
- Source:
- Overrides:
Validate maximum winning payout before placebet
Parameters:
| Name | Type | Description |
|---|---|---|
potWinMax |
number |
Returns:
- Type
- boolean
checkMaxStakeError() → {boolean}
- Source:
- Overrides:
Validate max stakes before placebet
Returns:
- Type
- boolean
checkMinStakeError() → {boolean}
- Source:
- Overrides:
Validate min stakes before placebet
Returns:
- Type
- boolean
clearAllSelections() → {void}
- Source:
- Overrides:
Clear all selections
Returns:
- Type
- void
clearAllTimeouts() → {void}
- Source:
- Overrides:
Clear all timeouts
Returns:
- Type
- void
clearSelection(index) → {void}
- Source:
- Overrides:
Clear selected row
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number |
Returns:
- Type
- void
clearStake() → {void}
- Source:
- Overrides:
Change stake value to 0
Returns:
- Type
- void
closeError() → {void}
- Source:
- Overrides:
Close error modal
Returns:
- Type
- void
closeSlipConfirmation() → {void}
- Source:
- Overrides:
Close confirmation modal
Returns:
- Type
- void
componentDidMount() → {void}
- Source:
Calculate bet type on component mount
Returns:
- Type
- void
componentDidUpdate(prevProps) → {void}
- Source:
Setup settings when selected type change, calculate bet type on odd remove
Parameters:
| Name | Type | Description |
|---|---|---|
prevProps |
object |
Returns:
- Type
- void
componentWillUnmount() → {void}
- Source:
Open modal view placed bets on component unmount if bet is placed
Returns:
- Type
- void
getFreeBetsAmount() → {Array}
- Source:
- Overrides:
Return first 5 bets amount
Returns:
- Type
- Array
initSplitBetTab(num, numOfSplitBets) → {void}
- Source:
- Overrides:
Initialize split bet tab
Parameters:
| Name | Type | Description |
|---|---|---|
num |
number | |
numOfSplitBets |
number |
Returns:
- Type
- void
initSystemTab(systemManager, isDeleting) → {object}
- Source:
- Overrides:
Initialize combination bet tab
Parameters:
| Name | Type | Description |
|---|---|---|
systemManager |
object | |
isDeleting |
boolean |
Returns:
Odds (min/max), potential win (min/max)
- Type
- object
openFreeBetType() → {void}
- Source:
- Overrides:
Select free bet dtype from bottom navigation
Returns:
- Type
- void
openOtherTypes() → {void}
- Source:
- Overrides:
Select combination bet type from bottom navigation (Can be combinations or split bet)
Returns:
- Type
- void
parsePlacebetStake() → {object}
- Source:
- Overrides:
Parse stake string for placebet API
Returns:
Stake, bet type, and free bet id if it is free bet
- Type
- object
placebet() → {void}
- Source:
- Overrides:
Place bet action
Returns:
- Type
- void
render() → {view}
- Source:
- See:
Render
Returns:
- Type
- view
selectMultipleBet() → {void}
- Source:
- Overrides:
Select multiple bet type from bottom navigation
Returns:
- Type
- void
selectSingleBet() → {void}
- Source:
- Overrides:
Select single bet type from bottom navigation
Returns:
- Type
- void
setInputInFocus(index) → {void}
- Source:
- Overrides:
Set input in focus by input index
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number |
Returns:
- Type
- void
setInputOutOfFocus(e) → {void}
- Source:
- Overrides:
Set input out of focus and hide buttons
Parameters:
| Name | Type | Description |
|---|---|---|
e |
Event |
Returns:
- Type
- void
setupPlacebet(singleStakes, combi, multiple, other) → {object}
- Source:
- Overrides:
Setup placebet settings calculate total stake, bonus, potential win (min/max)
Parameters:
| Name | Type | Description |
|---|---|---|
singleStakes |
Array | |
combi |
Array | |
multiple |
number | |
other |
number |
Returns:
Settings (total stake, potential win (min/max), bonus amount)
- Type
- object
toggleBetslipModal() → {void}
- Source:
- Overrides:
Toggle betslip modal
Returns:
- Type
- void
updateCalc() → {void}
- Source:
- Overrides:
Change stake value
Returns:
- Type
- void
updateStakeValue(val) → {void}
- Source:
- Overrides:
Change stake value
Parameters:
| Name | Type | Description |
|---|---|---|
val |
numer |
Returns:
- Type
- void