be-components 5.7.6 → 5.7.7

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 (56) hide show
  1. package/lib/commonjs/Competition/components/AthleteMarketCard.js +1 -1
  2. package/lib/commonjs/Competition/components/MatchMarketCard.js +2 -2
  3. package/lib/commonjs/Components/Jerseys.js +25 -13
  4. package/lib/commonjs/Components/Jerseys.js.map +1 -1
  5. package/lib/commonjs/GolfScoreboard/components/LeaderBetSelector.js +1 -1
  6. package/lib/commonjs/GolfScoreboard/components/LeaderBetsList.js +1 -1
  7. package/lib/commonjs/GolfScoreboard/index.js +3 -3
  8. package/lib/commonjs/MarketComponents/components/AthleteMarket/index.js +1 -1
  9. package/lib/commonjs/MarketComponents/components/AthleteTournamentMarket/index.js +4 -2
  10. package/lib/commonjs/MarketComponents/components/AthleteTournamentMarket/index.js.map +1 -1
  11. package/lib/commonjs/MarketComponents/components/MatchMarket/index.js +1 -1
  12. package/lib/commonjs/MarketComponents/components/TournamentMarket/index.js +1 -0
  13. package/lib/commonjs/MarketComponents/components/TournamentMarket/index.js.map +1 -1
  14. package/lib/commonjs/SocialComponents/SocialOrderCard.js +1 -1
  15. package/lib/commonjs/Ticker/index.js +1 -1
  16. package/lib/module/Competition/components/AthleteMarketCard.js +1 -1
  17. package/lib/module/Competition/components/MatchMarketCard.js +2 -2
  18. package/lib/module/Components/Jerseys.js +24 -12
  19. package/lib/module/Components/Jerseys.js.map +1 -1
  20. package/lib/module/GolfScoreboard/components/LeaderBetSelector.js +1 -1
  21. package/lib/module/GolfScoreboard/components/LeaderBetsList.js +1 -1
  22. package/lib/module/GolfScoreboard/index.js +3 -3
  23. package/lib/module/MarketComponents/components/AthleteMarket/index.js +1 -1
  24. package/lib/module/MarketComponents/components/AthleteTournamentMarket/index.js +4 -2
  25. package/lib/module/MarketComponents/components/AthleteTournamentMarket/index.js.map +1 -1
  26. package/lib/module/MarketComponents/components/MatchMarket/index.js +1 -1
  27. package/lib/module/MarketComponents/components/TournamentMarket/index.js +1 -0
  28. package/lib/module/MarketComponents/components/TournamentMarket/index.js.map +1 -1
  29. package/lib/module/SocialComponents/SocialOrderCard.js +1 -1
  30. package/lib/module/Ticker/index.js +1 -1
  31. package/lib/typescript/lib/commonjs/Components/Jerseys.d.ts.map +1 -1
  32. package/lib/typescript/lib/commonjs/MarketComponents/components/TournamentMarket/index.d.ts.map +1 -1
  33. package/lib/typescript/lib/module/Components/Jerseys.d.ts +2 -3
  34. package/lib/typescript/lib/module/Components/Jerseys.d.ts.map +1 -1
  35. package/lib/typescript/lib/module/MarketComponents/components/AthleteTournamentMarket/index.d.ts +2 -1
  36. package/lib/typescript/lib/module/MarketComponents/components/AthleteTournamentMarket/index.d.ts.map +1 -1
  37. package/lib/typescript/lib/module/MarketComponents/components/TournamentMarket/index.d.ts.map +1 -1
  38. package/lib/typescript/src/Components/Jerseys.d.ts.map +1 -1
  39. package/lib/typescript/src/MarketComponents/components/AthleteTournamentMarket/index.d.ts +3 -2
  40. package/lib/typescript/src/MarketComponents/components/AthleteTournamentMarket/index.d.ts.map +1 -1
  41. package/lib/typescript/src/MarketComponents/components/TournamentMarket/index.d.ts.map +1 -1
  42. package/lib/typescript/src/MarketComponents/index.d.ts +2 -1
  43. package/lib/typescript/src/MarketComponents/index.d.ts.map +1 -1
  44. package/package.json +1 -1
  45. package/src/Competition/components/AthleteMarketCard.tsx +1 -1
  46. package/src/Competition/components/MatchMarketCard.tsx +2 -2
  47. package/src/Components/Jerseys.tsx +12 -8
  48. package/src/GolfScoreboard/components/LeaderBetSelector.tsx +1 -1
  49. package/src/GolfScoreboard/components/LeaderBetsList.tsx +1 -1
  50. package/src/GolfScoreboard/index.tsx +3 -3
  51. package/src/MarketComponents/components/AthleteMarket/index.tsx +1 -1
  52. package/src/MarketComponents/components/AthleteTournamentMarket/index.tsx +6 -4
  53. package/src/MarketComponents/components/MatchMarket/index.tsx +1 -1
  54. package/src/MarketComponents/components/TournamentMarket/index.tsx +1 -0
  55. package/src/SocialComponents/SocialOrderCard.tsx +1 -1
  56. package/src/Ticker/index.tsx +1 -1
@@ -145,7 +145,7 @@ declare const _default: {
145
145
  away_label?: string;
146
146
  home_label?: string;
147
147
  }) => import("react").JSX.Element;
148
- AthleteTournamentMarket: import("react").MemoExoticComponent<({ tournament, 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 }: {
148
+ 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 }: {
149
149
  tournament: import("../types").TournamentProps;
150
150
  event_type: "team" | "tournament" | "match";
151
151
  athlete: import("../types").AthleteProps;
@@ -156,6 +156,7 @@ declare const _default: {
156
156
  hide_image?: boolean;
157
157
  style?: any;
158
158
  show_event?: boolean;
159
+ league?: import("../types").LeagueProps;
159
160
  direction?: "horizontal" | "vertical";
160
161
  hide_liquidity?: boolean;
161
162
  latest_trades: import("../types").TradeProps[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/MarketComponents/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;qBAgC2oB,CAAC;mBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAf5oB,CAAC;qBACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAcse,CAAC;mBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBARnf,CAAC;qBACX,CAAC;;;;;;;;;;;;;AATZ,wBAgBC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/MarketComponents/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;qBAgC2oB,CAAC;mBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAf5oB,CAAC;qBACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAcse,CAAC;mBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBARnf,CAAC;qBACX,CAAC;;;;;;;;;;;;;AATZ,wBAgBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "be-components",
3
- "version": "5.7.6",
3
+ "version": "5.7.7",
4
4
  "description": "Components for BettorEdge Apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -70,7 +70,7 @@ const AthleteMarketCard = ({ markets, competition_type, event, athlete, mode, l
70
70
 
71
71
  <View transparent nativeID="event_details" style={{ flexGrow:1, flexDirection:orientation=='horizontal'?'row':'column', alignItems:'center' }}>
72
72
  <View transparent nativeID="athlete_image" style={{ flexGrow:1 }}>
73
- <AthleteImage athlete={athlete} size={38} number_size={10}/>
73
+ <AthleteImage athlete={athlete} size={48} number_size={10}/>
74
74
  </View>
75
75
  <View transparent>
76
76
  <Text size={16} theme='h1' textAlign="center">{athlete.first_name} {athlete.last_name}</Text>
@@ -80,12 +80,12 @@ const MatchMarketCard = ({ match, home_athlete, away_athlete, competition_type,
80
80
  {match.participant_type == 'athlete' ?
81
81
  <View transparent nativeID="event_details" style={{ flex:1, flexDirection:'row', alignItems:'center' }}>
82
82
  <View transparent nativeID="away_athlete" style={{ flex:1 }}>
83
- <AthleteImage size={24} athlete={away_athlete}/>
83
+ <AthleteImage size={48} athlete={away_athlete}/>
84
84
  <Text style={{ padding:10 }} size={14} theme='h1' textAlign="center">{away_athlete.first_name} {away_athlete.last_name}</Text>
85
85
  </View>
86
86
  <Text size={14} theme='h1' style={{ padding:20 }} weight='bold'>VS</Text>
87
87
  <View transparent nativeID="away_athlete" style={{ flex:1 }}>
88
- <AthleteImage size={24} athlete={home_athlete}/>
88
+ <AthleteImage size={48} athlete={home_athlete}/>
89
89
  <Text style={{ padding:10 }} size={14} theme='h1' weight='bold' textAlign="center">{home_athlete.first_name} {home_athlete.last_name}</Text>
90
90
  </View>
91
91
  </View>
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- import { View, Image as RN_Image } from 'react-native';
2
+ import { Image as RN_Image } from 'react-native';
3
3
  import type { AthleteProps, LeagueProps, TeamProps } from "../types"
4
4
  import Colors from '../constants/colors';
5
5
  import Text from './Text';
6
6
  import Svg, { G, Defs, Path, Polygon, Pattern, Image, Line, Rect} from 'react-native-svg';
7
+ import { View } from './Themed';
7
8
 
8
9
  type AthleteImageProps = {
9
10
  athlete:AthleteProps
@@ -35,23 +36,23 @@ const AthleteImage = ({ athlete, size, number_size, league }:AthleteImageProps)
35
36
  case 'NBA':
36
37
  return <NBAJersey size={size} jersey_fill={athlete.team?.primary_color ?? Colors.brand.midnight} stripe_fill={athlete.team?.secondary_color ?? Colors.brand.mint} />
37
38
  case 'HORSE':
38
- return <Horse />
39
+ return <Horse size={size}/>
39
40
  default:
40
41
  return <NFLJersey size={size} jersey_fill={athlete.team?.primary_color ?? Colors.brand.midnight} stripe_fill={athlete.team?.secondary_color ?? Colors.brand.mint}/>
41
42
  }
42
43
  }
43
44
 
44
45
  return (
45
- <View style={{ alignSelf:'center', justifyContent:'center', alignItems:'center', height:athlete_image?undefined:size*2, width:athlete_image?undefined:size*2, borderRadius:100, backgroundColor:Colors.shades.white }}>
46
+ <View float style={{ alignSelf:'center', justifyContent:'center', alignItems:'center', padding:5, height:size+4, width:size+4, borderRadius:100 }}>
46
47
  {athlete_image ?
47
- <RN_Image source={{ uri: athlete_image }} style={{ height:size*2, width:size*2, borderRadius:100 }} resizeMode='center'/>
48
+ <RN_Image source={{ uri: athlete_image }} style={{ height:size, width:size, borderRadius:100 }} resizeMode='center'/>
48
49
  :
49
- <View>
50
+ <View transparent>
50
51
  {getAthleteImage()}
51
52
  </View>
52
53
  }
53
54
  {!athlete_image && (athlete.jersey_number || athlete.jersey_number == 0) ?
54
- <View style={{ position:'absolute', top:0, left:0, right:0, bottom:0, justifyContent:'center', alignItems:'center' }}>
55
+ <View transparent style={{ position:'absolute', top:0, left:0, right:0, bottom:0, justifyContent:'center', alignItems:'center' }}>
55
56
  <Text weight='bold' size={number_size ?? 18} color={Colors.shades.white}>{athlete.jersey_number}</Text>
56
57
  </View>
57
58
  :<></>}
@@ -185,9 +186,12 @@ const PGAJersey = ({ size }:{size?:number}) => {
185
186
  }
186
187
 
187
188
 
188
- const Horse = () => {
189
+ const Horse = ({ size }:{size?:number}) => {
190
+ const ratio = 0.574
191
+ const width = size ?? 35
192
+ const height = width * ratio
189
193
  return (
190
- <Svg width="47px" height="27px" viewBox="0 0 47 27">
194
+ <Svg width={`${width}px`} height={`${height}px`} viewBox="0 0 47 27">
191
195
  <G id="Page-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
192
196
  <G id="Horse" transform="translate(1.000000, 1.000000)">
193
197
  <Path d="M4,18.5 L4,10.5 L12.5,10 L12.5,18.5 C12.5,18.8333 12.4,19 12,19 L5,19 C4.2,19 4,18.8333 4,18.5 Z" id="Path" fill="#C4C4C4" fillRule="nonzero"></Path>
@@ -165,7 +165,7 @@ const LeaderBetSelector = ({ athlete, golf_leader, golf_statistics, prior_year,
165
165
  <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
166
166
  <AthleteImage
167
167
  athlete={athlete}
168
- size={16}
168
+ size={32}
169
169
  />
170
170
  <View transparent style={{ flex:1, marginLeft:10 }}>
171
171
  <Text theme='h1'>{athlete.first_name} {athlete.last_name}</Text>
@@ -99,7 +99,7 @@ const LeaderBetsList = ({ golf_leader, athlete, orders, markets, max_height, act
99
99
  <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
100
100
  <AthleteImage
101
101
  athlete={athlete}
102
- size={16}
102
+ size={32}
103
103
  />
104
104
  <View transparent style={{ flex:1, marginLeft:10 }}>
105
105
  <Text theme='h1'>{athlete.first_name} {athlete.last_name}</Text>
@@ -174,7 +174,7 @@ const GolfScoreboard = ({ player_id, my_orders, tournament_id, markets, best_ava
174
174
  <AthleteImage
175
175
  athlete={athlete}
176
176
  league={league}
177
- size={24}
177
+ size={48}
178
178
  />
179
179
  </View>
180
180
  <View transparent style={{ flex:1, marginLeft:5 }}>
@@ -228,7 +228,7 @@ const GolfScoreboard = ({ player_id, my_orders, tournament_id, markets, best_ava
228
228
  <AthleteImage
229
229
  athlete={athlete}
230
230
  league={league}
231
- size={24}
231
+ size={48}
232
232
  />
233
233
  </View>
234
234
  <View transparent style={{ flex:1, marginLeft:10 }}>
@@ -273,7 +273,7 @@ const GolfScoreboard = ({ player_id, my_orders, tournament_id, markets, best_ava
273
273
  <View transparent style={{ padding:10, flex:1 }}>
274
274
  <AthleteImage
275
275
  athlete={athlete}
276
- size={24}
276
+ size={48}
277
277
  />
278
278
  <Text style={{ marginTop:5 }} theme='h2' textAlign='center'>{athlete.first_name} {athlete.last_name}</Text>
279
279
  </View>
@@ -89,7 +89,7 @@ const AthleteMarket = ({ event, show_event, float, hide_image, direction, league
89
89
  <AthleteImage
90
90
  athlete={athlete}
91
91
  league={league}
92
- size={direction == 'horizontal' ? 25 : 40}
92
+ size={direction == 'horizontal' ? 60 : 60}
93
93
  number_size={12}
94
94
  />
95
95
  :<></>}
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useMemo } from 'react';
2
- import type { AthleteProps, BestAvailableOrderProps, EventOrderStatProps, MarketProps, MarketSideOptionProps, OrderProps, TournamentProps, TradeProps } from "../../../types"
2
+ import type { AthleteProps, BestAvailableOrderProps, EventOrderStatProps, LeagueProps, MarketProps, MarketSideOptionProps, OrderProps, TournamentProps, TradeProps } from "../../../types"
3
3
  import MarketButton from '../MarketButton';
4
4
  import { Icons, LinearDiagnal } from '../../../Components';
5
5
  import { MarketButtonHelpers } from '../MarketButton/api';
@@ -19,6 +19,7 @@ type AthleteTournamentMarketProps = {
19
19
  hide_image?:boolean,
20
20
  style?:any,
21
21
  show_event?:boolean,
22
+ league?:LeagueProps,
22
23
  direction?:'horizontal'|'vertical',
23
24
  hide_liquidity?:boolean,
24
25
  latest_trades:TradeProps[],
@@ -31,7 +32,7 @@ type AthleteTournamentMarketProps = {
31
32
  onTradeLongPress:(trade:TradeProps) => void
32
33
  }
33
34
 
34
- const AthleteTournamentMarket = ({ tournament, 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) => {
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) => {
35
36
  const C = useColors();
36
37
  const { liquidity, open_order_count } = useMemo(() => MarketComponentHelpers.getLiqudity(event_order_stats),[JSON.stringify(event_order_stats)]);
37
38
  const is_locked = useMemo(() => MarketComponentHelpers.isTournamentMarketLocked(tournament, market.market_id),[JSON.stringify(tournament.supported_markets)])
@@ -82,11 +83,12 @@ const AthleteTournamentMarket = ({ tournament, float, style, hide_image, directi
82
83
  :<></>}
83
84
  <View transparent style={{ flexDirection:direction == 'horizontal' ? 'row' : 'column', flexGrow:1 }}>
84
85
 
85
- <View transparent style={{ flexDirection:direction == 'horizontal' ? 'row' : 'column', flexGrow:1, padding:0, justifyContent:'center', alignItems:'center' }}>
86
+ <View transparent style={{ flexDirection:direction == 'horizontal' ? 'row' : 'column', flexGrow:1, padding:2, justifyContent:'center', alignItems:'center' }}>
86
87
  {!hide_image ?
87
88
  <AthleteImage
88
89
  athlete={athlete}
89
- size={35}
90
+ league={league}
91
+ size={50}
90
92
  number_size={12}
91
93
  />
92
94
  :<></>}
@@ -41,7 +41,7 @@ const MatchMarket = ({ league, match, tournament, float, show_event, hide_image,
41
41
  const { liquidity, open_order_count } = useMemo(() => MarketComponentHelpers.getLiqudity(event_order_stats), [JSON.stringify(event_order_stats)])
42
42
  const is_locked = useMemo(() => MarketComponentHelpers.isMatchMarketLocked(match, market.market_id),[JSON.stringify(match.supported_markets)])
43
43
  const match_time_detail = MarketComponentHelpers.getMatchTimeDetail(match);
44
- let image_size = image_size_override ?? 28
44
+ let image_size = image_size_override ?? 40
45
45
  if(!image_size_override && width){ image_size = width * 0.18 }
46
46
 
47
47
  const getSideLabel = (side:string) => {
@@ -217,6 +217,7 @@ const TournamentMarket = ({ tournament, float, wrap_markets, width, style, marke
217
217
  onTradeLongPress={onTradeLongPress}
218
218
  onView={onView}
219
219
  float
220
+ league={league}
220
221
  style={{ flexGrow:1 }}
221
222
  show_grades={show_grades}
222
223
  hide_liquidity={hide_participant_liquidity ? true : false}
@@ -96,7 +96,7 @@ const SocialOrderCard = ({ player, show_player, hide_contest, maxWidth, league,
96
96
  :athlete ?
97
97
  <AthleteImage
98
98
  athlete={athlete}
99
- size={16}
99
+ size={32}
100
100
  />
101
101
  :<></>}
102
102
  <View transparent style={{ flex:1, marginLeft:10, marginRight:10 }}>
@@ -162,7 +162,7 @@ const Ticker = ({ league_ids, color_mode, distinct_id, onOrders }:TickerProps) =
162
162
  <AthleteImage
163
163
  league={data.league}
164
164
  athlete={athlete}
165
- size={20}
165
+ size={32}
166
166
  />
167
167
  </View>
168
168