be-components 6.2.6 → 6.2.8

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.
Files changed (150) hide show
  1. package/lib/commonjs/ApiOverrides/index.js +2 -2
  2. package/lib/commonjs/ApiOverrides/index.js.map +1 -1
  3. package/lib/commonjs/Components/Icons.js +53 -0
  4. package/lib/commonjs/Components/Icons.js.map +1 -1
  5. package/lib/commonjs/Components/Jerseys.js +37 -5
  6. package/lib/commonjs/Components/Jerseys.js.map +1 -1
  7. package/lib/commonjs/GolfScoreboard/components/LeaderBetSelector.js +7 -2
  8. package/lib/commonjs/GolfScoreboard/components/LeaderBetSelector.js.map +1 -1
  9. package/lib/commonjs/GolfScoreboard/index.js +1 -0
  10. package/lib/commonjs/GolfScoreboard/index.js.map +1 -1
  11. package/lib/commonjs/MarketComponents/components/AthleteMarket/index.js +6 -1
  12. package/lib/commonjs/MarketComponents/components/AthleteMarket/index.js.map +1 -1
  13. package/lib/commonjs/MarketComponents/components/AthleteTournamentMarket/index.js +6 -1
  14. package/lib/commonjs/MarketComponents/components/AthleteTournamentMarket/index.js.map +1 -1
  15. package/lib/commonjs/MarketComponents/components/CreateMarketForm.js +27 -58
  16. package/lib/commonjs/MarketComponents/components/CreateMarketForm.js.map +1 -1
  17. package/lib/commonjs/MarketComponents/components/EventMarket/index.js +6 -1
  18. package/lib/commonjs/MarketComponents/components/EventMarket/index.js.map +1 -1
  19. package/lib/commonjs/MarketComponents/components/MatchMarket/index.js +6 -1
  20. package/lib/commonjs/MarketComponents/components/MatchMarket/index.js.map +1 -1
  21. package/lib/commonjs/MarketComponents/components/Parlay/ParlayCard.js +213 -0
  22. package/lib/commonjs/MarketComponents/components/Parlay/ParlayCard.js.map +1 -0
  23. package/lib/commonjs/MarketComponents/components/Parlay/api/index.js +16 -0
  24. package/lib/commonjs/MarketComponents/components/Parlay/api/index.js.map +1 -0
  25. package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js +8 -1
  26. package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
  27. package/lib/commonjs/MarketComponents/components/TeamTournamentMarket/index.js +6 -1
  28. package/lib/commonjs/MarketComponents/components/TeamTournamentMarket/index.js.map +1 -1
  29. package/lib/commonjs/MarketComponents/components/TournamentMarket/index.js +4 -0
  30. package/lib/commonjs/MarketComponents/components/TournamentMarket/index.js.map +1 -1
  31. package/lib/commonjs/MarketComponents/index.js +2 -0
  32. package/lib/commonjs/MarketComponents/index.js.map +1 -1
  33. package/lib/module/ApiOverrides/index.js +2 -2
  34. package/lib/module/ApiOverrides/index.js.map +1 -1
  35. package/lib/module/Components/Icons.js +54 -1
  36. package/lib/module/Components/Icons.js.map +1 -1
  37. package/lib/module/Components/Jerseys.js +37 -5
  38. package/lib/module/Components/Jerseys.js.map +1 -1
  39. package/lib/module/GolfScoreboard/components/LeaderBetSelector.js +7 -2
  40. package/lib/module/GolfScoreboard/components/LeaderBetSelector.js.map +1 -1
  41. package/lib/module/GolfScoreboard/index.js +1 -0
  42. package/lib/module/GolfScoreboard/index.js.map +1 -1
  43. package/lib/module/MarketComponents/components/AthleteMarket/index.js +6 -1
  44. package/lib/module/MarketComponents/components/AthleteMarket/index.js.map +1 -1
  45. package/lib/module/MarketComponents/components/AthleteTournamentMarket/index.js +6 -1
  46. package/lib/module/MarketComponents/components/AthleteTournamentMarket/index.js.map +1 -1
  47. package/lib/module/MarketComponents/components/CreateMarketForm.js +27 -58
  48. package/lib/module/MarketComponents/components/CreateMarketForm.js.map +1 -1
  49. package/lib/module/MarketComponents/components/EventMarket/index.js +6 -1
  50. package/lib/module/MarketComponents/components/EventMarket/index.js.map +1 -1
  51. package/lib/module/MarketComponents/components/MatchMarket/index.js +6 -1
  52. package/lib/module/MarketComponents/components/MatchMarket/index.js.map +1 -1
  53. package/lib/module/MarketComponents/components/Parlay/ParlayCard.js +206 -0
  54. package/lib/module/MarketComponents/components/Parlay/ParlayCard.js.map +1 -0
  55. package/lib/module/MarketComponents/components/Parlay/api/index.js +10 -0
  56. package/lib/module/MarketComponents/components/Parlay/api/index.js.map +1 -0
  57. package/lib/module/MarketComponents/components/TeamEventMarket/index.js +8 -1
  58. package/lib/module/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
  59. package/lib/module/MarketComponents/components/TeamTournamentMarket/index.js +6 -1
  60. package/lib/module/MarketComponents/components/TeamTournamentMarket/index.js.map +1 -1
  61. package/lib/module/MarketComponents/components/TournamentMarket/index.js +4 -0
  62. package/lib/module/MarketComponents/components/TournamentMarket/index.js.map +1 -1
  63. package/lib/module/MarketComponents/index.js +2 -0
  64. package/lib/module/MarketComponents/index.js.map +1 -1
  65. package/lib/typescript/lib/commonjs/Components/Icons.d.ts +5 -0
  66. package/lib/typescript/lib/commonjs/Components/Icons.d.ts.map +1 -1
  67. package/lib/typescript/lib/commonjs/Components/Jerseys.d.ts.map +1 -1
  68. package/lib/typescript/lib/commonjs/GolfScoreboard/components/LeaderBetSelector.d.ts +2 -1
  69. package/lib/typescript/lib/commonjs/GolfScoreboard/components/LeaderBetSelector.d.ts.map +1 -1
  70. package/lib/typescript/lib/commonjs/GolfScoreboard/index.d.ts.map +1 -1
  71. package/lib/typescript/lib/commonjs/MarketComponents/components/CreateMarketForm.d.ts.map +1 -1
  72. package/lib/typescript/lib/commonjs/MarketComponents/components/Parlay/ParlayCard.d.ts +15 -0
  73. package/lib/typescript/lib/commonjs/MarketComponents/components/Parlay/ParlayCard.d.ts.map +1 -0
  74. package/lib/typescript/lib/commonjs/MarketComponents/components/Parlay/api/index.d.ts +5 -0
  75. package/lib/typescript/lib/commonjs/MarketComponents/components/Parlay/api/index.d.ts.map +1 -0
  76. package/lib/typescript/lib/commonjs/MarketComponents/components/TournamentMarket/index.d.ts +2 -1
  77. package/lib/typescript/lib/commonjs/MarketComponents/components/TournamentMarket/index.d.ts.map +1 -1
  78. package/lib/typescript/lib/commonjs/MarketComponents/index.d.ts +1 -0
  79. package/lib/typescript/lib/module/Components/Icons.d.ts +5 -0
  80. package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
  81. package/lib/typescript/lib/module/Components/Jerseys.d.ts.map +1 -1
  82. package/lib/typescript/lib/module/GolfScoreboard/components/LeaderBetSelector.d.ts +2 -1
  83. package/lib/typescript/lib/module/GolfScoreboard/components/LeaderBetSelector.d.ts.map +1 -1
  84. package/lib/typescript/lib/module/GolfScoreboard/index.d.ts.map +1 -1
  85. package/lib/typescript/lib/module/MarketComponents/components/AthleteMarket/index.d.ts +2 -1
  86. package/lib/typescript/lib/module/MarketComponents/components/AthleteMarket/index.d.ts.map +1 -1
  87. package/lib/typescript/lib/module/MarketComponents/components/AthleteTournamentMarket/index.d.ts +2 -1
  88. package/lib/typescript/lib/module/MarketComponents/components/AthleteTournamentMarket/index.d.ts.map +1 -1
  89. package/lib/typescript/lib/module/MarketComponents/components/CreateMarketForm.d.ts.map +1 -1
  90. package/lib/typescript/lib/module/MarketComponents/components/EventMarket/index.d.ts +2 -1
  91. package/lib/typescript/lib/module/MarketComponents/components/EventMarket/index.d.ts.map +1 -1
  92. package/lib/typescript/lib/module/MarketComponents/components/MatchMarket/index.d.ts +2 -1
  93. package/lib/typescript/lib/module/MarketComponents/components/MatchMarket/index.d.ts.map +1 -1
  94. package/lib/typescript/lib/module/MarketComponents/components/Parlay/ParlayCard.d.ts +15 -0
  95. package/lib/typescript/lib/module/MarketComponents/components/Parlay/ParlayCard.d.ts.map +1 -0
  96. package/lib/typescript/lib/module/MarketComponents/components/Parlay/api/index.d.ts +4 -0
  97. package/lib/typescript/lib/module/MarketComponents/components/Parlay/api/index.d.ts.map +1 -0
  98. package/lib/typescript/lib/module/MarketComponents/components/TeamEventMarket/index.d.ts +2 -1
  99. package/lib/typescript/lib/module/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -1
  100. package/lib/typescript/lib/module/MarketComponents/components/TeamTournamentMarket/index.d.ts +2 -1
  101. package/lib/typescript/lib/module/MarketComponents/components/TeamTournamentMarket/index.d.ts.map +1 -1
  102. package/lib/typescript/lib/module/MarketComponents/components/TournamentMarket/index.d.ts +2 -1
  103. package/lib/typescript/lib/module/MarketComponents/components/TournamentMarket/index.d.ts.map +1 -1
  104. package/lib/typescript/lib/module/MarketComponents/index.d.ts +2 -0
  105. package/lib/typescript/lib/module/MarketComponents/index.d.ts.map +1 -1
  106. package/lib/typescript/src/Components/Icons.d.ts +6 -0
  107. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  108. package/lib/typescript/src/Components/Jerseys.d.ts.map +1 -1
  109. package/lib/typescript/src/GolfScoreboard/components/LeaderBetSelector.d.ts +2 -1
  110. package/lib/typescript/src/GolfScoreboard/components/LeaderBetSelector.d.ts.map +1 -1
  111. package/lib/typescript/src/GolfScoreboard/index.d.ts.map +1 -1
  112. package/lib/typescript/src/MarketComponents/components/AthleteMarket/index.d.ts +2 -1
  113. package/lib/typescript/src/MarketComponents/components/AthleteMarket/index.d.ts.map +1 -1
  114. package/lib/typescript/src/MarketComponents/components/AthleteTournamentMarket/index.d.ts +2 -1
  115. package/lib/typescript/src/MarketComponents/components/AthleteTournamentMarket/index.d.ts.map +1 -1
  116. package/lib/typescript/src/MarketComponents/components/CreateMarketForm.d.ts.map +1 -1
  117. package/lib/typescript/src/MarketComponents/components/EventMarket/index.d.ts +2 -1
  118. package/lib/typescript/src/MarketComponents/components/EventMarket/index.d.ts.map +1 -1
  119. package/lib/typescript/src/MarketComponents/components/MatchMarket/index.d.ts +2 -1
  120. package/lib/typescript/src/MarketComponents/components/MatchMarket/index.d.ts.map +1 -1
  121. package/lib/typescript/src/MarketComponents/components/Parlay/ParlayCard.d.ts +19 -0
  122. package/lib/typescript/src/MarketComponents/components/Parlay/ParlayCard.d.ts.map +1 -0
  123. package/lib/typescript/src/MarketComponents/components/Parlay/api/index.d.ts +5 -0
  124. package/lib/typescript/src/MarketComponents/components/Parlay/api/index.d.ts.map +1 -0
  125. package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts +2 -1
  126. package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -1
  127. package/lib/typescript/src/MarketComponents/components/TeamTournamentMarket/index.d.ts +2 -1
  128. package/lib/typescript/src/MarketComponents/components/TeamTournamentMarket/index.d.ts.map +1 -1
  129. package/lib/typescript/src/MarketComponents/components/TournamentMarket/index.d.ts +2 -1
  130. package/lib/typescript/src/MarketComponents/components/TournamentMarket/index.d.ts.map +1 -1
  131. package/lib/typescript/src/MarketComponents/index.d.ts +27 -7
  132. package/lib/typescript/src/MarketComponents/index.d.ts.map +1 -1
  133. package/package.json +1 -1
  134. package/src/ApiOverrides/index.ts +2 -2
  135. package/src/Components/Icons.tsx +29 -1
  136. package/src/Components/Jerseys.tsx +12 -4
  137. package/src/GolfScoreboard/components/LeaderBetSelector.tsx +9 -4
  138. package/src/GolfScoreboard/index.tsx +1 -0
  139. package/src/MarketComponents/components/AthleteMarket/index.tsx +5 -2
  140. package/src/MarketComponents/components/AthleteTournamentMarket/index.tsx +5 -2
  141. package/src/MarketComponents/components/CreateMarketForm.tsx +17 -30
  142. package/src/MarketComponents/components/EventMarket/index.tsx +6 -2
  143. package/src/MarketComponents/components/MatchMarket/index.tsx +5 -3
  144. package/src/MarketComponents/components/Parlay/ParlayCard.tsx +127 -0
  145. package/src/MarketComponents/components/Parlay/api/index.ts +11 -0
  146. package/src/MarketComponents/components/TeamEventMarket/index.tsx +7 -2
  147. package/src/MarketComponents/components/TeamTournamentMarket/index.tsx +5 -2
  148. package/src/MarketComponents/components/TournamentMarket/index.tsx +5 -1
  149. package/src/MarketComponents/index.tsx +2 -0
  150. package/src/types.d.ts +52 -0
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
- TeamEventMarket: import("react").MemoExoticComponent<({ event, hide_non_primary, flash_markets, league, float, style, init_expanded, hot_markets_direction, show_id, hide_liquidity, show_podcasts, activate_loading, competitions, squares_competitions, show_grades, markets, latest_trades, best_available_orders, event_order_stats, default_price_view, onSetMarket, onTeamSelect, onFlashSelect, onSquaresSelect, onCompetitionSelect, onExpand, onOrder, onViewMarketStats, onView, onViewAdditionalMarkets, onTradeLongPress, onTVSelect, onActivate, onEvent, onShare, onPodcastSelect }: {
2
+ TeamEventMarket: import("react").MemoExoticComponent<({ event, hide_non_primary, disabled_markets, flash_markets, league, float, style, init_expanded, hot_markets_direction, show_id, hide_liquidity, show_podcasts, activate_loading, competitions, squares_competitions, show_grades, markets, latest_trades, best_available_orders, event_order_stats, default_price_view, onSetMarket, onTeamSelect, onFlashSelect, onSquaresSelect, onCompetitionSelect, onExpand, onOrder, onViewMarketStats, onView, onViewAdditionalMarkets, onTradeLongPress, onTVSelect, onActivate, onEvent, onShare, onPodcastSelect }: {
3
3
  event: import("../types").EventProps;
4
4
  markets: import("../types").MarketProps[];
5
5
  init_expanded?: boolean;
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  league?: import("../types").LeagueProps;
9
9
  competitions?: import("../types").CompetitionProps[];
10
10
  show_id?: string;
11
+ disabled_markets?: string[];
11
12
  hide_liquidity?: boolean;
12
13
  float?: boolean;
13
14
  hot_markets_direction?: "vertical" | "horizontal";
@@ -43,13 +44,14 @@ declare const _default: {
43
44
  onActivate?: (event_id: string, event_type: string) => void;
44
45
  activate_loading?: boolean;
45
46
  }) => import("react").JSX.Element>;
46
- TeamTournamentMarket: import("react").MemoExoticComponent<({ tournament, float, direction, show_event, hide_liquidity, hide_stat_banner, style, team, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onOrder, onView, onTradeLongPress }: {
47
+ TeamTournamentMarket: import("react").MemoExoticComponent<({ tournament, disabled_markets, float, direction, show_event, hide_liquidity, hide_stat_banner, style, team, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onOrder, onView, onTradeLongPress }: {
47
48
  tournament: import("../types").TournamentProps;
48
49
  event_type: "team" | "tournament" | "match";
49
50
  team: import("../types").TeamProps;
50
51
  hide_stat_banner?: boolean;
51
52
  width?: number;
52
53
  float?: boolean;
54
+ disabled_markets?: string[];
53
55
  market: import("../types").MarketProps;
54
56
  direction?: "horizontal" | "vertical";
55
57
  show_event?: boolean;
@@ -70,11 +72,12 @@ declare const _default: {
70
72
  }) => void;
71
73
  onTradeLongPress: (trade: import("../types").TradeProps) => void;
72
74
  }) => import("react").JSX.Element>;
73
- AthleteMarket: import("react").MemoExoticComponent<({ event, show_event, float, hide_image, direction, league, hide_liquidity, style, hide_stat_banner, athlete, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onOrder, onView, onTradeLongPress, onSetMarket }: {
75
+ AthleteMarket: import("react").MemoExoticComponent<({ event, show_event, disabled_markets, float, hide_image, direction, league, hide_liquidity, style, hide_stat_banner, athlete, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onOrder, onView, onTradeLongPress, onSetMarket }: {
74
76
  event: import("../types").EventProps;
75
77
  event_type: "team" | "tournament" | "match";
76
78
  athlete: import("../types").AthleteProps;
77
79
  hide_stat_banner?: boolean;
80
+ disabled_markets?: string[];
78
81
  width?: number;
79
82
  market: import("../types").MarketProps;
80
83
  onSetMarket?: (market_id: string, side_type?: string, side_id?: string) => void;
@@ -110,11 +113,12 @@ declare const _default: {
110
113
  onBuyNow?: (order: import("../types").OrderProps) => void;
111
114
  onCancelOrder?: (order_id: string) => void;
112
115
  }) => import("react").JSX.Element;
113
- EventMarket: import("react").MemoExoticComponent<({ event, float, style, direction, hide_liquidity, market, latest_trades, best_available_orders, hide_market_banner, event_order_stats, show_grades, default_price_view, onOrder, onView, onTradeLongPress }: {
116
+ EventMarket: import("react").MemoExoticComponent<({ event, float, style, disabled_markets, direction, hide_liquidity, market, latest_trades, best_available_orders, hide_market_banner, event_order_stats, show_grades, default_price_view, onOrder, onView, onTradeLongPress }: {
114
117
  event: import("../types").EventProps;
115
118
  width?: number;
116
119
  market: import("../types").MarketProps;
117
120
  float?: boolean;
121
+ disabled_markets?: string[];
118
122
  hide_market_banner?: boolean;
119
123
  latest_trades: import("../types").TradeProps[];
120
124
  hide_liquidity?: boolean;
@@ -161,6 +165,19 @@ declare const _default: {
161
165
  onCancel: () => void;
162
166
  onSubmitOrders: (orders: import("../types").OrderProps[]) => void;
163
167
  }) => import("react").JSX.Element;
168
+ ParlayCard: ({ float, card_style, header_style, footer_style, teams, athletes, leagues, players, parlay, orders }: {
169
+ parlay: import("../types").ParlayProps;
170
+ float?: boolean;
171
+ card_style?: import("react-native").ViewStyle;
172
+ header_style?: import("react-native").ViewStyle;
173
+ footer_style?: import("react-native").ViewStyle;
174
+ players: import("../types").PublicPlayerProps[];
175
+ leagues: import("../types").LeagueProps[];
176
+ teams: import("../types").TeamProps[];
177
+ athletes: import("../types").AthleteProps[];
178
+ parlay_positions: import("../types").ParlayPositionProps[];
179
+ orders: import("../types").OrderProps[];
180
+ }) => import("react").JSX.Element;
164
181
  MarketManager: ({ player_id, contest_type, contest_id, onViewMatch, onViewTrade, onViewOrder, onClose, onViewPlayer }: {
165
182
  player_id?: string;
166
183
  contest_type: string;
@@ -182,13 +199,14 @@ declare const _default: {
182
199
  away_label?: string;
183
200
  home_label?: string;
184
201
  }) => import("react").JSX.Element;
185
- AthleteTournamentMarket: import("react").MemoExoticComponent<({ tournament, league, float, style, hide_image, direction, show_event, hide_liquidity, hide_stat_banner, athlete, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onOrder, onView, onTradeLongPress }: {
202
+ AthleteTournamentMarket: import("react").MemoExoticComponent<({ tournament, disabled_markets, league, float, style, hide_image, direction, show_event, hide_liquidity, hide_stat_banner, athlete, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onOrder, onView, onTradeLongPress }: {
186
203
  tournament: import("../types").TournamentProps;
187
204
  event_type: "team" | "tournament" | "match";
188
205
  athlete: import("../types").AthleteProps;
189
206
  hide_stat_banner?: boolean;
190
207
  width?: number;
191
208
  float?: boolean;
209
+ disabled_markets?: string[];
192
210
  market: import("../types").MarketProps;
193
211
  hide_image?: boolean;
194
212
  style?: any;
@@ -255,7 +273,7 @@ declare const _default: {
255
273
  init_side?: string;
256
274
  onClose: () => void;
257
275
  }) => import("react").JSX.Element;
258
- TournamentMarket: ({ tournament, float, wrap_markets, width, style, market_selector_location, flash_markets, hide_match_liquidity, show_grades, hide_participant_liquidity, league, markets, latest_trades, hide_liquidity, best_available_orders, event_order_stats, match_available_orders, match_latest_trades, match_order_stats, activate_loading, onView, onTradeLongPress, onViewAdditionalMarkets, onViewMarketStats, onFlashSelect, onOrder, onActivate, onShare }: {
276
+ TournamentMarket: ({ tournament, float, disabled_markets, wrap_markets, width, style, market_selector_location, flash_markets, hide_match_liquidity, show_grades, hide_participant_liquidity, league, markets, latest_trades, hide_liquidity, best_available_orders, event_order_stats, match_available_orders, match_latest_trades, match_order_stats, activate_loading, onView, onTradeLongPress, onViewAdditionalMarkets, onViewMarketStats, onFlashSelect, onOrder, onActivate, onShare }: {
259
277
  tournament: import("../types").TournamentProps;
260
278
  league?: import("../types").LeagueProps;
261
279
  markets: import("../types").MarketProps[];
@@ -265,6 +283,7 @@ declare const _default: {
265
283
  hide_match_liquidity?: boolean;
266
284
  show_grades?: boolean;
267
285
  float?: boolean;
286
+ disabled_markets?: string[];
268
287
  hide_participant_liquidity?: boolean;
269
288
  activate_loading?: boolean;
270
289
  wrap_markets?: boolean;
@@ -291,7 +310,7 @@ declare const _default: {
291
310
  onViewAdditionalMarkets: (event_id: string, event_type: string) => void;
292
311
  onOrder: (order: import("../types").OrderProps) => void;
293
312
  }) => import("react").JSX.Element;
294
- MatchMarket: import("react").MemoExoticComponent<({ league, match, tournament, float, flash_markets, show_event, hide_image, image_size_override, direction, style, hide_liquidity, hide_stat_banner, width, away_athlete, home_athlete, away_team, home_team, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onFlashSelect, onOrder, onView, onTradeLongPress }: {
313
+ MatchMarket: import("react").MemoExoticComponent<({ league, match, tournament, disabled_markets, float, flash_markets, show_event, hide_image, image_size_override, direction, style, hide_liquidity, hide_stat_banner, width, away_athlete, home_athlete, away_team, home_team, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onFlashSelect, onOrder, onView, onTradeLongPress }: {
295
314
  league?: import("../types").LeagueProps;
296
315
  tournament?: import("../types").TournamentProps;
297
316
  match: import("../types").MatchProps;
@@ -300,6 +319,7 @@ declare const _default: {
300
319
  direction?: "horizontal" | "vertical";
301
320
  away_team?: import("../types").TeamProps;
302
321
  hide_image?: boolean;
322
+ disabled_markets?: string[];
303
323
  float?: boolean;
304
324
  home_team?: import("../types").TeamProps;
305
325
  image_size_override?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/MarketComponents/index.tsx"],"names":[],"mappings":";;;;;;mDAoCmC,CAAC,iBAAgB,CAAC;;;;;;;;;;;;;;;;;;;qBAAslB,CAAC;mBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDArBlpB,CAAC,iBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAM,CAAC;qBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqB2R,CAAC;mBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAf9V,CAAC;qBACD,CAAC;;;;;;;;;;;;;AAJP,wBAkBC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/MarketComponents/index.tsx"],"names":[],"mappings":";;;;;;mDAmCe,CAAC,iBACD,CAAC;;;;;;;;;;;;;;;;;;;;qBAEklB,CAAC;mBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDAvBzkB,CAAC,iBACxC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAD8B,CAAC;qBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuBkP,CAAC;mBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAnB9S,CAAC;qBACC,CAAC;;;;;;;;;;;;;AADhB,wBAmBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "be-components",
3
- "version": "6.2.6",
3
+ "version": "6.2.8",
4
4
  "description": "Components for BettorEdge Apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -6,8 +6,8 @@ import type { AuthStateProps } from './types';
6
6
 
7
7
  const ENVIRONMENT_ENDPOINTS = {
8
8
  DEVELOPMENT: {
9
- AUTH_SVC_API: 'http://localhost:5000',
10
- CLIENT_API_KEY: '2c4b3d06-6306-4376-9964-89b69a18b96f',
9
+ AUTH_SVC_API: 'http://localhost:5001',
10
+ CLIENT_API_KEY: 'ffkko9-232l=ssdkk=skd-kdj3-ssj',
11
11
  VOUCH_ID: 'adqEZph8t*_NBFy6u_l4!t~Hin6kpK',
12
12
  VOUCHED_CALLBACK_URL: 'https://1f9b-64-159-204-178.ngrok-free.app/v1/players/vouch/hook',
13
13
  VOUCHED_SANDBOX: true,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import Colors from '../constants/colors';
3
- import Svg, { G, Circle, Line, Path, Rect, Defs, Stop, Polygon, Polyline, LinearGradient } from 'react-native-svg';
3
+ import Svg, { G, Circle, Line, Path, Rect, Defs, Text, Stop, Polygon, Polyline, LinearGradient, TSpan } from 'react-native-svg';
4
4
 
5
5
 
6
6
  type IconProps = {
@@ -906,6 +906,33 @@ const PreferencesIcon = ({ color, size }:IconProps) => {
906
906
  </Svg>
907
907
  )
908
908
  }
909
+ type ParlayIconsProps = IconProps & {
910
+ star_1_color?: string,
911
+ star_2_color?:string,
912
+ star_3_color?:string
913
+ }
914
+ const ParlayIcon = ({ size, color }:ParlayIconsProps) => {
915
+ const icon_size = size ?? 40
916
+
917
+ return (
918
+ <Svg width={`${icon_size}px`} height={`${icon_size}px`} viewBox="0 0 60 60">
919
+ <G id="app-icons" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
920
+ <G id="Group">
921
+ <G id="trophy-svgrepo-com-(1)" fill={color ?? Colors.brand.midnight} fillRule="nonzero">
922
+ <Path d="M56.25,5.625 L49.6875,5.625 L49.6875,3.75 C49.6875,1.67625 48.0103125,0 45.9375,0 L14.0625,0 C11.9896875,0 10.3125,1.67625 10.3125,3.75 L10.3125,5.625 L3.75,5.625 C1.6771875,5.625 0,7.30125 0,9.375 L0,16.875 C0,22.569375 4.6171875,27.1875 10.3125,27.1875 L10.4025,27.1875 C11.259375,36.2428125 18.2596875,43.4953125 27.1875,44.7759375 L27.1875,52.5 L20.625,52.5 C18.5521875,52.5 16.875,54.17625 16.875,56.25 L16.875,59.0625 C16.875,59.58 17.2940625,60 17.8125,60 L42.1875,60 C42.7059375,60 43.125,59.58 43.125,59.0625 L43.125,56.25 C43.125,54.17625 41.4478125,52.5 39.375,52.5 L32.8125,52.5 L32.8125,44.7759375 C41.7403125,43.4953125 48.7359375,36.2446875 49.5928125,27.1875 L49.6875,27.1875 C55.3828125,27.1875 60,22.569375 60,16.875 L60,9.375 C60,7.30125 58.3228125,5.625 56.25,5.625 Z M10.3125,21.5625 C7.723125,21.5625 5.625,19.4634375 5.625,16.875 L5.625,11.25 L10.3125,11.25 L10.3125,21.5625 Z M1.875,16.875 L1.875,9.375 C1.875,8.3390625 2.715,7.5 3.75,7.5 L10.3125,7.5 L10.3125,9.375 L4.6875,9.375 C4.1690625,9.375 3.75,9.793125 3.75,10.3125 L3.75,16.875 C3.75,20.4984375 6.688125,23.4375 10.3125,23.4375 L10.3125,25.3125 C5.6521875,25.3125 1.875,21.534375 1.875,16.875 Z M39.375,54.375 C40.41,54.375 41.25,55.2140625 41.25,56.25 L41.25,58.125 L18.75,58.125 L18.75,56.25 C18.75,55.2140625 19.59,54.375 20.625,54.375 L39.375,54.375 Z M29.0625,52.5 L29.0625,44.95125 C29.375625,44.96625 29.683125,45 30,45 C30.316875,45 30.624375,44.96625 30.9375,44.95125 L30.9375,52.5 L29.0625,52.5 Z M47.8125,25.3125 C47.8125,35.14875 39.8371875,43.125 30,43.125 C20.1628125,43.125 12.1875,35.14875 12.1875,25.3125 L12.1875,3.75 C12.1875,2.7140625 13.0275,1.875 14.0625,1.875 L45.9375,1.875 C46.9725,1.875 47.8125,2.7140625 47.8125,3.75 L47.8125,25.3125 Z M49.6875,11.25 L54.375,11.25 L54.375,16.875 C54.375,19.4634375 52.276875,21.5625 49.6875,21.5625 L49.6875,11.25 Z M58.125,16.875 C58.125,21.534375 54.3478125,25.3125 49.6875,25.3125 L49.6875,23.4375 C53.311875,23.4375 56.25,20.4984375 56.25,16.875 L56.25,10.3125 C56.25,9.793125 55.8309375,9.375 55.3125,9.375 L49.6875,9.375 L49.6875,7.5 L56.25,7.5 C57.285,7.5 58.125,8.3390625 58.125,9.375 L58.125,16.875 Z" id="Shape"></Path>
923
+ <Path d="M22.3006413,6.63983314 L20.2804289,6.33133936 L19.3727633,4.39833043 C19.2954055,4.23330033 19.1299065,4.12875 18.9484672,4.12875 C18.7670278,4.12875 18.6015289,4.23376916 18.524171,4.39833043 L17.6165054,6.33133936 L15.5962931,6.63983314 C15.4228239,6.66702561 15.2784226,6.78751634 15.2226311,6.95442179 C15.1668397,7.12132724 15.2090349,7.30464194 15.331401,7.4307587 L16.8063576,8.94369098 L16.4570751,11.0834564 C16.4280073,11.2606762 16.5034898,11.4388337 16.6497665,11.5424464 C16.7960432,11.646059 16.9896723,11.6563734 17.147201,11.5701077 L18.9479983,10.5747698 L20.7487956,11.5701077 C20.8205275,11.609021 20.898823,11.6282433 20.9766497,11.6282433 C21.0713545,11.6282433 21.1660593,11.5991755 21.246699,11.5419775 C21.3929757,11.4383649 21.4684582,11.2602074 21.4393904,11.0829875 L21.0901079,8.94322215 L22.5650645,7.43028986 C22.6878994,7.3041731 22.7300946,7.12085841 22.6738343,6.95395296 C22.6175741,6.7870475 22.4745792,6.66702561 22.3006413,6.63983314 Z M20.2537053,8.45797736 C20.1496238,8.56487187 20.1027403,8.71396157 20.1266509,8.86070709 L20.3587245,10.2808099 L19.1763212,9.62678436 C19.1055271,9.58787101 19.0277004,9.56817992 18.9494048,9.56817992 C18.8711093,9.56817992 18.7932826,9.58787101 18.7224884,9.62678436 L17.5400852,10.2808099 L17.7721588,8.86070709 C17.7960694,8.71396157 17.748717,8.56440303 17.6451044,8.45797736 L16.6413275,7.42982103 L18.0070454,7.22072038 C18.1612923,7.1972786 18.2939727,7.0983543 18.3605474,6.95676597 L18.9498737,5.7012244 L19.5391999,6.95676597 C19.6057746,7.09882314 19.738455,7.19774744 19.8927019,7.22072038 L21.2584199,7.42982103 L20.2537053,8.45797736 Z" id="Shape"></Path>
924
+ <Path d="M33.1006413,6.63983314 L31.0804289,6.33133936 L30.1727633,4.39833043 C30.0954055,4.23330033 29.9299065,4.12875 29.7484672,4.12875 C29.5670278,4.12875 29.4015289,4.23376916 29.324171,4.39833043 L28.4165054,6.33133936 L26.3962931,6.63983314 C26.2228239,6.66702561 26.0784226,6.78751634 26.0226311,6.95442179 C25.9668397,7.12132724 26.0090349,7.30464194 26.131401,7.4307587 L27.6063576,8.94369098 L27.2570751,11.0834564 C27.2280073,11.2606762 27.3034898,11.4388337 27.4497665,11.5424464 C27.5960432,11.646059 27.7896723,11.6563734 27.947201,11.5701077 L29.7479983,10.5747698 L31.5487956,11.5701077 C31.6205275,11.609021 31.698823,11.6282433 31.7766497,11.6282433 C31.8713545,11.6282433 31.9660593,11.5991755 32.046699,11.5419775 C32.1929757,11.4383649 32.2684582,11.2602074 32.2393904,11.0829875 L31.8901079,8.94322215 L33.3650645,7.43028986 C33.4878994,7.3041731 33.5300946,7.12085841 33.4738343,6.95395296 C33.4175741,6.7870475 33.2745792,6.66702561 33.1006413,6.63983314 Z M31.0537053,8.45797736 C30.9496238,8.56487187 30.9027403,8.71396157 30.9266509,8.86070709 L31.1587245,10.2808099 L29.9763212,9.62678436 C29.9055271,9.58787101 29.8277004,9.56817992 29.7494048,9.56817992 C29.6711093,9.56817992 29.5932826,9.58787101 29.5224884,9.62678436 L28.3400852,10.2808099 L28.5721588,8.86070709 C28.5960694,8.71396157 28.548717,8.56440303 28.4451044,8.45797736 L27.4413275,7.42982103 L28.8070454,7.22072038 C28.9612923,7.1972786 29.0939727,7.0983543 29.1605474,6.95676597 L29.7498737,5.7012244 L30.3391999,6.95676597 C30.4057746,7.09882314 30.538455,7.19774744 30.6927019,7.22072038 L32.0584199,7.42982103 L31.0537053,8.45797736 Z" id="Shape"></Path>
925
+ <Path d="M44.6006413,6.63983314 L42.5804289,6.33133936 L41.6727633,4.39833043 C41.5954055,4.23330033 41.4299065,4.12875 41.2484672,4.12875 C41.0670278,4.12875 40.9015289,4.23376916 40.824171,4.39833043 L39.9165054,6.33133936 L37.8962931,6.63983314 C37.7228239,6.66702561 37.5784226,6.78751634 37.5226311,6.95442179 C37.4668397,7.12132724 37.5090349,7.30464194 37.631401,7.4307587 L39.1063576,8.94369098 L38.7570751,11.0834564 C38.7280073,11.2606762 38.8034898,11.4388337 38.9497665,11.5424464 C39.0960432,11.646059 39.2896723,11.6563734 39.447201,11.5701077 L41.2479983,10.5747698 L43.0487956,11.5701077 C43.1205275,11.609021 43.198823,11.6282433 43.2766497,11.6282433 C43.3713545,11.6282433 43.4660593,11.5991755 43.546699,11.5419775 C43.6929757,11.4383649 43.7684582,11.2602074 43.7393904,11.0829875 L43.3901079,8.94322215 L44.8650645,7.43028986 C44.9878994,7.3041731 45.0300946,7.12085841 44.9738343,6.95395296 C44.9175741,6.7870475 44.7745792,6.66702561 44.6006413,6.63983314 Z M42.5537053,8.45797736 C42.4496238,8.56487187 42.4027403,8.71396157 42.4266509,8.86070709 L42.6587245,10.2808099 L41.4763212,9.62678436 C41.4055271,9.58787101 41.3277004,9.56817992 41.2494048,9.56817992 C41.1711093,9.56817992 41.0932826,9.58787101 41.0224884,9.62678436 L39.8400852,10.2808099 L40.0721588,8.86070709 C40.0960694,8.71396157 40.048717,8.56440303 39.9451044,8.45797736 L38.9413275,7.42982103 L40.3070454,7.22072038 C40.4612923,7.1972786 40.5939727,7.0983543 40.6605474,6.95676597 L41.2498737,5.7012244 L41.8391999,6.95676597 C41.9057746,7.09882314 42.038455,7.19774744 42.1927019,7.22072038 L43.5584199,7.42982103 L42.5537053,8.45797736 Z" id="Shape"></Path>
926
+ </G>
927
+ <Text id="P" fontFamily="Barlow-Bold, Barlow" fontSize="24" fontWeight="bold" fill={color ?? Colors.brand.midnight}>
928
+ <TSpan x="24" y="36">P</TSpan>
929
+ </Text>
930
+ <Line x1="14.5" y1="13.5" x2="46.5" y2="13.5" id="Line" stroke="#231F20" strokeLinecap="square"></Line>
931
+ </G>
932
+ </G>
933
+ </Svg>
934
+ )
935
+ }
909
936
 
910
937
  const WithdrawIcon = ({ color, size }:IconProps) => {
911
938
  let width = size ?? 20
@@ -1668,6 +1695,7 @@ export default {
1668
1695
  TransactionSuccessIcon,
1669
1696
  PlayIcon,
1670
1697
  PauseIcon,
1698
+ ParlayIcon,
1671
1699
  TransactionErrorIcon,
1672
1700
  VisaCardIcon,
1673
1701
  AthleteIcon,
@@ -76,13 +76,21 @@ const TeamImage = ({ team, league , size} : TeamImageProps) => {
76
76
  <RN_Image source={{ uri: team.image.url }} style={{ height:image_size * 2, width:image_size * 2, borderRadius:100 }} resizeMode='center'/>
77
77
 
78
78
  : league?.league_name == 'NBA' ?
79
- <NBAJersey jersey_fill={team?.primary_color ?? Colors.brand.midnight} stripe_fill={team?.secondary_color ?? Colors.brand.mint}/>
79
+ <View style={{ height: image_size, width: image_size, justifyContent:'center', alignItems:'center' }}>
80
+ <NBAJersey size={size} jersey_fill={team?.primary_color ?? Colors.brand.midnight} stripe_fill={team?.secondary_color ?? Colors.brand.mint}/>
81
+ </View>
80
82
  : league?.league_name == 'NHL' ?
81
- <NHLJersey jersey_fill={team?.primary_color ?? Colors.brand.midnight} stripe_fill={team?.secondary_color ?? Colors.brand.mint}/>
83
+ <View style={{ height: image_size, width: image_size, justifyContent:'center', alignItems:'center' }}>
84
+ <NHLJersey size={size} jersey_fill={team?.primary_color ?? Colors.brand.midnight} stripe_fill={team?.secondary_color ?? Colors.brand.mint}/>
85
+ </View>
82
86
  : league?.league_name == 'MLB' ?
83
- <MLBJersey jersey_fill={team?.primary_color ?? Colors.brand.midnight} stripe_fill={team?.secondary_color ?? Colors.brand.mint}/>
87
+ <View style={{ height: image_size, width: image_size, justifyContent:'center', alignItems:'center' }}>
88
+ <MLBJersey size={size} jersey_fill={team?.primary_color ?? Colors.brand.midnight} stripe_fill={team?.secondary_color ?? Colors.brand.mint}/>
89
+ </View>
84
90
  :
85
- <NFLJersey jersey_fill={team?.primary_color ?? Colors.brand.midnight} stripe_fill={team?.secondary_color ?? Colors.brand.mint}/>
91
+ <View style={{ height: image_size, width: image_size, justifyContent:'center', alignItems:'center' }}>
92
+ <NFLJersey size={size} jersey_fill={team?.primary_color ?? Colors.brand.midnight} stripe_fill={team?.secondary_color ?? Colors.brand.mint}/>
93
+ </View>
86
94
  }
87
95
  </View>
88
96
  )
@@ -13,6 +13,7 @@ import moment from 'moment-mini';
13
13
 
14
14
  type LeaderBetSelectorProps = {
15
15
  tournament:TournamentProps,
16
+ my_orders: OrderProps[],
16
17
  best_available_orders:BestAvailableOrderProps[],
17
18
  latest_trades:TradeProps[],
18
19
  golf_leader:GolfLeaderProps,
@@ -27,7 +28,7 @@ type LeaderBetSelectorProps = {
27
28
  }
28
29
  const leader_bet_sections = ['leader','market_details','holes']
29
30
 
30
- const LeaderBetSelector = ({ athlete, golf_leader, golf_statistics, prior_year, best_available_orders, latest_trades, tournament, markets, active_round, golf_course, onClose, onOrder }:LeaderBetSelectorProps) => {
31
+ const LeaderBetSelector = ({ athlete, golf_leader, my_orders, golf_statistics, prior_year, best_available_orders, latest_trades, tournament, markets, active_round, golf_course, onClose, onOrder }:LeaderBetSelectorProps) => {
31
32
  const [ leader_data, setLeaderData ] = useState<{
32
33
  loading:boolean,
33
34
  scorecards:GolfScorecardProps[]
@@ -40,6 +41,7 @@ const LeaderBetSelector = ({ athlete, golf_leader, golf_statistics, prior_year,
40
41
  useEffect(() => {
41
42
  getData();
42
43
  },[athlete?.athlete_id]);
44
+ let athlete_orders = my_orders.filter(o => o.side_id == athlete.athlete_id);
43
45
 
44
46
  const getData = async() => {
45
47
  setLeaderData({ ...leader_data, loading:true });
@@ -52,7 +54,8 @@ const LeaderBetSelector = ({ athlete, golf_leader, golf_statistics, prior_year,
52
54
  }
53
55
  const Colors = useColors();
54
56
  const current_hole = GolfHelpers.getCurrentHole(golf_leader, active_round);
55
- const renderSides = (data:{ item:MarketSideOptionProps, index:number, market:MarketProps, trades:TradeProps[] }) => {
57
+ const renderSides = (data:{ item:MarketSideOptionProps, index:number, market:MarketProps, trades:TradeProps[], orders:OrderProps[] }) => {
58
+
56
59
  let ba_order = best_available_orders.find(o => o.market_id == data.market.market_id && o.side_type == 'athlete' && o.side_id == athlete.athlete_id && o.side == data.item.side && o.show);
57
60
  const side_details = MarketComponentHelpers.getTournamentSideIds(data.market, data.item, athlete, undefined);
58
61
  if(!side_details){ return <></> }
@@ -71,6 +74,7 @@ const LeaderBetSelector = ({ athlete, golf_leader, golf_statistics, prior_year,
71
74
  if(order_title){ ba_order.title = order_title }
72
75
  }
73
76
  */
77
+ let side_order = data.orders.find(o => o.side == data.item.side);
74
78
  return (
75
79
  <View key={`${tournament.tournament_id}_${athlete.athlete_id}_${data.item.side}`} style={{ margin:2, height:50, width:75 }}>
76
80
  <MarketButton
@@ -78,7 +82,7 @@ const LeaderBetSelector = ({ athlete, golf_leader, golf_statistics, prior_year,
78
82
  market={data.market}
79
83
  trade={trade}
80
84
  show_grades={false}
81
- locked={false}
85
+ locked={side_order ? true: false}
82
86
  order={ba_order}
83
87
  onLongPress={() => console.log('LONG PRESSED')}
84
88
  onPress={(order) => {
@@ -99,6 +103,7 @@ const LeaderBetSelector = ({ athlete, golf_leader, golf_statistics, prior_year,
99
103
  const completed = current_hole > data.item.number ? true : false
100
104
  const score = scorecards.find(s => s.hole_number == data.item.number && s.round_number == active_round);
101
105
  const trades = GolfHelpers.getParTradeFromHoleStats(tournament.tournament_id, athlete, market, stats);
106
+ const active_hole_orders = athlete_orders.filter(o => o.market_id == market?.market_id && o.resolution_status == 'inprogress');
102
107
 
103
108
  return (
104
109
  <View style={{ flexDirection:'row', alignItems:'center', padding:10, borderBottomWidth:1, borderColor:Colors.borders.light, backgroundColor:completed ? Colors.views.header : undefined }}>
@@ -119,7 +124,7 @@ const LeaderBetSelector = ({ athlete, golf_leader, golf_statistics, prior_year,
119
124
  key={'side_options_bet_leader'}
120
125
  horizontal
121
126
  keyExtractor={(item) => `${market.market_id}_${item.side}`}
122
- renderItem={({ item, index }) => renderSides({ item, index, market, trades })}
127
+ renderItem={({ item, index }) => renderSides({ item, index, market, trades, orders:active_hole_orders })}
123
128
 
124
129
  />
125
130
  </View>
@@ -484,6 +484,7 @@ const GolfScoreboard = ({ player_id, my_orders, tournament_id, markets, best_ava
484
484
  <LeaderBetSelector
485
485
  golf_leader={golf_leader}
486
486
  golf_course={golf_course}
487
+ my_orders={hole_orders}
487
488
  markets={markets}
488
489
  best_available_orders={best_available.filter(o => o.side_id == golf_athlete.athlete_id)}
489
490
  latest_trades={[]}
@@ -14,6 +14,7 @@ type AthleteMarketProps = {
14
14
  event_type:'team'|'tournament'|'match',
15
15
  athlete:AthleteProps,
16
16
  hide_stat_banner?:boolean,
17
+ disabled_markets?:string[],
17
18
  width?:number,
18
19
  market:MarketProps,
19
20
  onSetMarket?:(market_id:string, side_type?:string, side_id?:string) => void,
@@ -34,7 +35,7 @@ type AthleteMarketProps = {
34
35
  onTradeLongPress:(trade:TradeProps) => void
35
36
  }
36
37
 
37
- const AthleteMarket = ({ event, show_event, float, hide_image, direction, league, hide_liquidity, style, hide_stat_banner, athlete, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onOrder, onView, onTradeLongPress, onSetMarket }:AthleteMarketProps) => {
38
+ const AthleteMarket = ({ event, show_event, disabled_markets, float, hide_image, direction, league, hide_liquidity, style, hide_stat_banner, athlete, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onOrder, onView, onTradeLongPress, onSetMarket }:AthleteMarketProps) => {
38
39
  const C = useColors();
39
40
 
40
41
  const { liquidity, open_order_count } = useMemo(() => MarketComponentHelpers.getLiqudity(event_order_stats), [JSON.stringify(event_order_stats)])
@@ -48,6 +49,8 @@ const AthleteMarket = ({ event, show_event, float, hide_image, direction, league
48
49
  if(!trade){
49
50
  trade = MarketButtonHelpers.getTradeFromMarket(market, event.event_id, 'team', data.item.side, data.item.id_source, side_details.side_id, side_details.reversed_side_id);
50
51
  }
52
+ let disabled = false
53
+ if(disabled_markets && disabled_markets.includes(data.market.market_id)){ disabled = true }
51
54
  return (
52
55
  <View key={`${event.event_id}_${athlete.athlete_id}_${market.market_id}_${data.item.side}`} style={{ margin:2, height:50, width:75 }}>
53
56
  <MarketButton
@@ -56,7 +59,7 @@ const AthleteMarket = ({ event, show_event, float, hide_image, direction, league
56
59
  trade={trade}
57
60
  show_grades={show_grades}
58
61
  order={ba_order}
59
- locked={is_locked}
62
+ locked={is_locked || disabled}
60
63
  onLongPress={onTradeLongPress}
61
64
  onPress={(order) => {
62
65
  const order_title = MarketComponentHelpers.getOrderTitleForTeamEvent(order, market, event, athlete);
@@ -15,6 +15,7 @@ type AthleteTournamentMarketProps = {
15
15
  hide_stat_banner?:boolean,
16
16
  width?:number,
17
17
  float?:boolean,
18
+ disabled_markets?:string[],
18
19
  market:MarketProps,
19
20
  hide_image?:boolean,
20
21
  style?:any,
@@ -32,7 +33,7 @@ type AthleteTournamentMarketProps = {
32
33
  onTradeLongPress:(trade:TradeProps) => void
33
34
  }
34
35
 
35
- const AthleteTournamentMarket = ({ tournament, league, float, style, hide_image, direction, show_event, hide_liquidity, hide_stat_banner, athlete, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onOrder, onView, onTradeLongPress }:AthleteTournamentMarketProps) => {
36
+ const AthleteTournamentMarket = ({ tournament, disabled_markets, league, float, style, hide_image, direction, show_event, hide_liquidity, hide_stat_banner, athlete, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onOrder, onView, onTradeLongPress }:AthleteTournamentMarketProps) => {
36
37
  const C = useColors();
37
38
  const { liquidity, open_order_count } = useMemo(() => MarketComponentHelpers.getLiqudity(event_order_stats),[JSON.stringify(event_order_stats)]);
38
39
  const is_locked = useMemo(() => MarketComponentHelpers.isTournamentMarketLocked(tournament, market.market_id),[JSON.stringify(tournament.supported_markets)])
@@ -45,6 +46,8 @@ const AthleteTournamentMarket = ({ tournament, league, float, style, hide_image,
45
46
  if(!trade){
46
47
  trade = MarketButtonHelpers.getTradeFromMarket(market, tournament.tournament_id, 'team', data.item.side, data.item.id_source, side_details.side_id, side_details.reversed_side_id);
47
48
  }
49
+ let disabled = false
50
+ if(disabled_markets && disabled_markets.includes(data.market.market_id)){ disabled = true }
48
51
  return (
49
52
  <View key={`${tournament.tournament_id}_${athlete.athlete_id}_${data.item.side}`} style={{ margin:2, height:50, width:75 }}>
50
53
  <MarketButton
@@ -52,7 +55,7 @@ const AthleteTournamentMarket = ({ tournament, league, float, style, hide_image,
52
55
  market={data.market}
53
56
  trade={trade}
54
57
  show_grades={show_grades}
55
- locked={is_locked}
58
+ locked={is_locked || disabled}
56
59
  order={ba_order}
57
60
  onLongPress={onTradeLongPress}
58
61
  onPress={(order) => {
@@ -27,8 +27,7 @@ type CreateMarketFormProps = {
27
27
  onSubmitOrders:(orders:OrderProps[]) => void
28
28
  }
29
29
 
30
-
31
- const sections = ['o_side', 'submit', 'trade_side', 'draft_orders','my_orders', 'what_if'];
30
+ const sections = ['o_side', 'margin', 'trade_side', 'submit', 'draft_orders','my_orders', 'what_if'];
32
31
  const CreateMarketForm = ({ float, action_loading, unit_size, location, coordinates, style, my_orders, best_available_orders, contest_type, contest_id, market_id, side_id, side_type, onCancel, onSubmitOrders }:CreateMarketFormProps) => {
33
32
  const Colors = useColors();
34
33
  const [ draft_orders, setDraftOrders ] = useState<OrderProps[]>([]);
@@ -63,7 +62,7 @@ const CreateMarketForm = ({ float, action_loading, unit_size, location, coordina
63
62
  const market = markets.find(mk => mk.market_id == market_id);
64
63
 
65
64
  const orders = MarketComponentHelpers.setMarket(parseFloat(stake), contest_type, best_available_orders, prices, o_side_margin, trade_side_margin, market, event, tournament, match, undefined, undefined)
66
- const no_vig_data = MarketMaketHelpers.getNoVigPrice(prices, market);
65
+ //const no_vig_data = MarketMaketHelpers.getNoVigPrice(prices, market);
67
66
 
68
67
 
69
68
  useEffect(() => {
@@ -103,7 +102,6 @@ const CreateMarketForm = ({ float, action_loading, unit_size, location, coordina
103
102
 
104
103
  let contest_trades = await MarketComponentApi.getLatestTradesByEvents(contest_type, [contest_id]);
105
104
 
106
-
107
105
  setFormData({
108
106
  ...form_data,
109
107
  loading:false,
@@ -135,7 +133,6 @@ const CreateMarketForm = ({ float, action_loading, unit_size, location, coordina
135
133
  let trade_side = trade_side_margin
136
134
  if(side == 'other' && direction == 'increase'){ o_side += 0.001 }
137
135
  if(side == 'other' && direction == 'decrease'){ o_side -= 0.001 }
138
-
139
136
  if(side == 'trade' && direction == 'increase'){ trade_side += 0.001 }
140
137
  if(side == 'trade' && direction == 'decrease'){ trade_side -= 0.001 }
141
138
  let total_margin = o_side + trade_side
@@ -212,6 +209,14 @@ const CreateMarketForm = ({ float, action_loading, unit_size, location, coordina
212
209
  </View>
213
210
  </View>
214
211
  )
212
+ case 'margin':
213
+ const total_margin = o_side_margin + trade_side_margin
214
+ return (
215
+ <View style={{ flexDirection:'row', alignItems:'center', justifyContent:'flex-end', padding:7 }}>
216
+ <Text theme='description'>Margin: </Text>
217
+ <Text theme='h2' color={total_margin > 0.06 ? Colors.text.error : total_margin > 0.045 ? Colors.text.warning : Colors.text.success}>{(total_margin*100).toFixed(2)}%</Text>
218
+ </View>
219
+ )
215
220
  case 'o_side':
216
221
  if(draft_orders.length > 0){ return <></> }
217
222
  if(!market){ return <></> }
@@ -219,8 +224,8 @@ const CreateMarketForm = ({ float, action_loading, unit_size, location, coordina
219
224
  if(!o_side_option){ return <></> }
220
225
  const o_side_order = orders.find(o => o.side != market.trade_side);
221
226
  if(!o_side_order){ return <></> }
222
- const o_side_price = prices.find(p => p.side != market.trade_side);
223
- const o_side_no_vig = no_vig_data?.o_side_odds
227
+ //const o_side_price = prices.find(p => p.side != market.trade_side);
228
+ //const o_side_no_vig = no_vig_data?.o_side_odds
224
229
  const o_best_available = best_available_orders.find(o => o.market_id == market_id && o.side != market.trade_side)
225
230
  //const my_o_side_open = my_orders.filter(o => o.market_id == market_id && o.side != market.trade_side);
226
231
  //const my_open_stats = MarketMaketHelpers.getOrderStats(my_o_side_open, o_best_available);
@@ -274,15 +279,7 @@ const CreateMarketForm = ({ float, action_loading, unit_size, location, coordina
274
279
  />
275
280
  </View>
276
281
  :<></>}
277
- {o_side_price && o_side_no_vig ?
278
- <View type='footer' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
279
- <View transparent style={{ flex:1 }}>
280
- <Text theme='h1'>{o_side_price.external_name}</Text>
281
- <Text theme='light' style={{ marginTop:3 }}>External price with vig removed</Text>
282
- </View>
283
- <Text theme='h2'>{MarketComponentHelpers.getOddsLabel(o_side_no_vig)}</Text>
284
- </View>
285
- :<></>}
282
+
286
283
  </View>
287
284
 
288
285
  )
@@ -312,8 +309,8 @@ const CreateMarketForm = ({ float, action_loading, unit_size, location, coordina
312
309
  if(!trade_side_option){ return <></> }
313
310
  const trade_side_order = orders.find(o => o.side == market.trade_side);
314
311
  if(!trade_side_order){ return <></> }
315
- const trade_side_price = prices.find(p => p.side == market.trade_side);
316
- const trade_side_no_vig_odds = no_vig_data?.trade_side_odds
312
+ //const trade_side_price = prices.find(p => p.side == market.trade_side);
313
+ //const trade_side_no_vig_odds = no_vig_data?.trade_side_odds
317
314
  const t_best_available = best_available_orders.find(o => o.market_id == market_id && o.side == market.trade_side)
318
315
  return (
319
316
  <View style={{ borderWidth:1, borderColor:Colors.borders.light, margin:10 }}>
@@ -364,15 +361,7 @@ const CreateMarketForm = ({ float, action_loading, unit_size, location, coordina
364
361
  />
365
362
  </View>
366
363
  :<></>}
367
- {trade_side_price && trade_side_no_vig_odds ?
368
- <View type='footer' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
369
- <View transparent style={{ flex:1 }}>
370
- <Text theme='h1'>{trade_side_price.external_name}</Text>
371
- <Text theme='light' style={{ marginTop:3 }}>External price with vig removed</Text>
372
- </View>
373
- <Text theme='h2'>{MarketComponentHelpers.getOddsLabel(trade_side_no_vig_odds)}</Text>
374
- </View>
375
- :<></>}
364
+
376
365
  </View>
377
366
  )
378
367
  case 'draft_orders':
@@ -389,7 +378,7 @@ const CreateMarketForm = ({ float, action_loading, unit_size, location, coordina
389
378
  }
390
379
  }
391
380
 
392
- const total_margin = o_side_margin + trade_side_margin
381
+ //const total_margin = o_side_margin + trade_side_margin
393
382
  return (
394
383
  <View float={float} style={{ ...style }}>
395
384
  <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopLeftRadius:8, borderTopRightRadius:8 }}>
@@ -397,8 +386,6 @@ const CreateMarketForm = ({ float, action_loading, unit_size, location, coordina
397
386
  <Text theme='h1'>{contest_title}</Text>
398
387
  </View>
399
388
  <View transparent style={{ justifyContent:'center', alignItems:'center' }}>
400
- <Text theme='h2' color={total_margin > 0.06 ? Colors.text.error : total_margin > 0.045 ? Colors.text.warning : Colors.text.success}>{(total_margin*100).toFixed(2)}%</Text>
401
- <Text theme='description' textAlign='center'>Margin</Text>
402
389
  </View>
403
390
  </View>
404
391
  <View type='body' style={{ flex:1 }}>
@@ -14,6 +14,7 @@ type EventMarketProps = {
14
14
  width?:number,
15
15
  market:MarketProps,
16
16
  float?:boolean,
17
+ disabled_markets?:string[],
17
18
  hide_market_banner?:boolean,
18
19
  latest_trades:TradeProps[],
19
20
  hide_liquidity?:boolean,
@@ -28,7 +29,7 @@ type EventMarketProps = {
28
29
  onTradeLongPress:(trade:TradeProps) => void
29
30
  }
30
31
 
31
- const EventMarket = ({ event, float, style, direction, hide_liquidity, market, latest_trades, best_available_orders, hide_market_banner, event_order_stats, show_grades, default_price_view, onOrder, onView, onTradeLongPress }:EventMarketProps) => {
32
+ const EventMarket = ({ event, float, style, disabled_markets, direction, hide_liquidity, market, latest_trades, best_available_orders, hide_market_banner, event_order_stats, show_grades, default_price_view, onOrder, onView, onTradeLongPress }:EventMarketProps) => {
32
33
  const C = useColors();
33
34
  const { liquidity, open_order_count } = useMemo(() => MarketComponentHelpers.getLiqudity(event_order_stats),[JSON.stringify(event_order_stats)]);
34
35
 
@@ -44,6 +45,9 @@ const EventMarket = ({ event, float, style, direction, hide_liquidity, market, l
44
45
  }
45
46
  if(!trade){ return <></> }
46
47
  let side_label = event[data.item.side as keyof EventProps]?.abbr
48
+ let disabled = false
49
+ if(disabled_markets && disabled_markets.includes(data.market.market_id)){ disabled = true }
50
+
47
51
  return (
48
52
  <View key={`${event.event_id}_${market.market_id}_${data.item.side}`} style={{ margin:2, height:50, width:75 }}>
49
53
  <MarketButton
@@ -51,7 +55,7 @@ const EventMarket = ({ event, float, style, direction, hide_liquidity, market, l
51
55
  market={data.market}
52
56
  side_label={side_label}
53
57
  show_grades={show_grades}
54
- locked={is_locked}
58
+ locked={is_locked || disabled}
55
59
  order={ba_order}
56
60
  onLongPress={onTradeLongPress}
57
61
  trade={trade}
@@ -19,6 +19,7 @@ type MatchMarketProps = {
19
19
  direction?:'horizontal'|'vertical',
20
20
  away_team?:TeamProps,
21
21
  hide_image?:boolean,
22
+ disabled_markets?:string[],
22
23
  float?:boolean,
23
24
  home_team?:TeamProps,
24
25
  image_size_override?:number,
@@ -40,7 +41,7 @@ type MatchMarketProps = {
40
41
  onTradeLongPress:(trade:TradeProps) => void
41
42
  }
42
43
 
43
- const MatchMarket = ({ league, match, tournament, float, flash_markets, show_event, hide_image, image_size_override, direction, style, hide_liquidity, hide_stat_banner, width, away_athlete, home_athlete, away_team, home_team, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onFlashSelect, onOrder, onView, onTradeLongPress }:MatchMarketProps) => {
44
+ const MatchMarket = ({ league, match, tournament, disabled_markets, float, flash_markets, show_event, hide_image, image_size_override, direction, style, hide_liquidity, hide_stat_banner, width, away_athlete, home_athlete, away_team, home_team, market, event_order_stats, default_price_view, latest_trades, show_grades, best_available_orders, onFlashSelect, onOrder, onView, onTradeLongPress }:MatchMarketProps) => {
44
45
  const C = useColors();
45
46
  const { liquidity, open_order_count } = useMemo(() => MarketComponentHelpers.getLiqudity(event_order_stats), [JSON.stringify(event_order_stats)])
46
47
  const is_locked = useMemo(() => MarketComponentHelpers.isMatchMarketLocked(match, market.market_id),[JSON.stringify(match.supported_markets)])
@@ -74,7 +75,8 @@ const MatchMarket = ({ league, match, tournament, float, flash_markets, show_eve
74
75
  }
75
76
 
76
77
  let side_label = getSideLabel(data.item.side);
77
-
78
+ let disabled = false
79
+ if(disabled_markets && disabled_markets.includes(data.market.market_id)){ disabled = true }
78
80
  return (
79
81
  <View key={`${match.match_id}_${data.item.side}`} style={{ margin:2, height:50, width:75 }}>
80
82
  <MarketButton
@@ -84,7 +86,7 @@ const MatchMarket = ({ league, match, tournament, float, flash_markets, show_eve
84
86
  trade={trade}
85
87
  show_grades={show_grades}
86
88
  order={ba_order}
87
- locked={is_locked}
89
+ locked={is_locked || disabled}
88
90
  onLongPress={onTradeLongPress}
89
91
  onPress={(order) => {
90
92
  const order_title = MarketComponentHelpers.getOrderTitleForMatch(order, market, match, athlete, team);