be-components 5.0.3 → 5.0.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/lib/commonjs/Authenticator/Components/StrategyForm.js +1 -1
- package/lib/commonjs/Authenticator/Components/StrategyForm.js.map +1 -1
- package/lib/commonjs/Bracket/api/index.js +13 -0
- package/lib/commonjs/Bracket/api/index.js.map +1 -1
- package/lib/commonjs/Bracket/components/BracketCompetitionActions.js +1 -1
- package/lib/commonjs/Bracket/components/BracketCompetitionActions.js.map +1 -1
- package/lib/commonjs/Bracket/components/BracketPlay/RoundEvent.js +23 -22
- package/lib/commonjs/Bracket/components/BracketPlay/RoundEvent.js.map +1 -1
- package/lib/commonjs/Bracket/components/BracketPlay/index.js +21 -1
- package/lib/commonjs/Bracket/components/BracketPlay/index.js.map +1 -1
- package/lib/commonjs/Bracket/index.js +5 -4
- package/lib/commonjs/Bracket/index.js.map +1 -1
- package/lib/module/Authenticator/Components/StrategyForm.js +1 -1
- package/lib/module/Authenticator/Components/StrategyForm.js.map +1 -1
- package/lib/module/Bracket/api/index.js +13 -0
- package/lib/module/Bracket/api/index.js.map +1 -1
- package/lib/module/Bracket/components/BracketCompetitionActions.js +1 -1
- package/lib/module/Bracket/components/BracketCompetitionActions.js.map +1 -1
- package/lib/module/Bracket/components/BracketPlay/RoundEvent.js +23 -22
- package/lib/module/Bracket/components/BracketPlay/RoundEvent.js.map +1 -1
- package/lib/module/Bracket/components/BracketPlay/index.js +21 -1
- package/lib/module/Bracket/components/BracketPlay/index.js.map +1 -1
- package/lib/module/Bracket/index.js +5 -4
- package/lib/module/Bracket/index.js.map +1 -1
- package/lib/typescript/lib/commonjs/Bracket/api/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/Bracket/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Bracket/components/BracketPlay/RoundEvent.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Bracket/components/BracketPlay/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Bracket/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Bracket/api/index.d.ts +1 -0
- package/lib/typescript/lib/module/Bracket/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Bracket/components/BracketPlay/RoundEvent.d.ts.map +1 -1
- package/lib/typescript/lib/module/Bracket/components/BracketPlay/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Bracket/index.d.ts.map +1 -1
- package/lib/typescript/src/Bracket/api/index.d.ts +5 -0
- package/lib/typescript/src/Bracket/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Bracket/components/BracketPlay/RoundEvent.d.ts.map +1 -1
- package/lib/typescript/src/Bracket/components/BracketPlay/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Authenticator/Components/StrategyForm.tsx +1 -1
- package/src/Bracket/api/index.ts +9 -0
- package/src/Bracket/components/BracketCompetitionActions.tsx +1 -1
- package/src/Bracket/components/BracketPlay/RoundEvent.tsx +24 -23
- package/src/Bracket/components/BracketPlay/index.tsx +19 -2
- package/src/Bracket/index.tsx +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoundEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/Bracket/components/BracketPlay/RoundEvent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,sBAAsB,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAOhI,KAAK,mBAAmB,GAAG;IACvB,WAAW,EAAC,eAAe,CAAC;IAC5B,YAAY,EAAC,eAAe,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAC,UAAU,CAAC;IAClB,mBAAmB,CAAC,EAAC,sBAAsB,CAAC;IAC5C,SAAS,CAAC,EAAC,SAAS,CAAC;IACrB,SAAS,CAAC,EAAC,SAAS,CAAC;IACrB,qBAAqB,CAAC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,EAAC,MAAM,CAAA;KAAE,CAAC;IACjE,iBAAiB,CAAC,EAAC,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAC,MAAM,CAAC;IACnB,KAAK,EAAC,MAAM,CAAC;IACb,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,eAAe,CAAC,EAAC,CAAC,WAAW,EAAC,eAAe,EAAE,OAAO,EAAC,YAAY,EAAE,mBAAmB,CAAC,EAAC,sBAAsB,EAAE,qBAAqB,CAAC,EAAC,sBAAsB,EAAE,qBAAqB,CAAC,EAAC,sBAAsB,KAAK,IAAI,CAAA;IACvN,qBAAqB,EAAE,CAAC,UAAU,EAAC,MAAM,KAAK,IAAI,CAAC;IACnD,mBAAmB,EAAC,CAAC,EAAE,EAAC,kBAAkB,KAAK,IAAI,CAAC;IACpD,qBAAqB,EAAE,CAAC,EAAE,EAAC,kBAAkB,EAAE,IAAI,EAAC,6BAA6B,EAAE,KAAK,IAAI,CAAC;CAChG,CAAA;AAED,QAAA,MAAM,WAAW,mLAAmL,gBAAgB,sBAsbnN,CAAA;AAED,eAAe,WAAW,CAAA"}
|
package/package.json
CHANGED
|
@@ -246,7 +246,7 @@ const StrategyForm = ({ visible, strategy, auth_strategy_id, onFocusPosition, co
|
|
|
246
246
|
autoFocus
|
|
247
247
|
textContentType={verify_strategy_identifier.secure_text_entry ? undefined : 'oneTimeCode'}
|
|
248
248
|
secureTextEntry={verify_strategy_identifier.secure_text_entry}
|
|
249
|
-
placeholderTextColor={C.text.
|
|
249
|
+
placeholderTextColor={C.text.descriptionLight}
|
|
250
250
|
onChangeText={(text) => {
|
|
251
251
|
setToken(text);
|
|
252
252
|
}}
|
package/src/Bracket/api/index.ts
CHANGED
|
@@ -247,6 +247,15 @@ const BracketCompetitionHelpers = {
|
|
|
247
247
|
return initial_test
|
|
248
248
|
|
|
249
249
|
},
|
|
250
|
+
calcRoundActions : (bracket_rounds:BracketRoundProps[], round_width:number, margin:number) => {
|
|
251
|
+
let location = 0
|
|
252
|
+
let round_actions:{ bracket_round:BracketRoundProps, location_start:number, location_end:number }[] = []
|
|
253
|
+
bracket_rounds.map(r => {
|
|
254
|
+
round_actions.push({ bracket_round: r, location_start: location, location_end: location + round_width });
|
|
255
|
+
location += round_width + (margin * 2)
|
|
256
|
+
})
|
|
257
|
+
return round_actions
|
|
258
|
+
},
|
|
250
259
|
calcFullBracketSize: ( round_width:number, rounds:number, margin:number ) => {
|
|
251
260
|
let full_length = (round_width * rounds * 2) + (margin * 2 * rounds) + 100 //Double since the groups are horizontal
|
|
252
261
|
return full_length
|
|
@@ -332,7 +332,7 @@ const BracketCompetitionActions = ({ competition_id, hide_image, image_height, r
|
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
return (
|
|
335
|
-
<View transparent style={{
|
|
335
|
+
<View transparent style={{ flex:1 }}>
|
|
336
336
|
<FlatList
|
|
337
337
|
key={`comp_actions_list`}
|
|
338
338
|
keyExtractor={(item) => item}
|
|
@@ -33,9 +33,10 @@ type RoundEventCardProps = {
|
|
|
33
33
|
const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_team, away_placeholder_team, home_placeholder_team, home_team, width, no_pick, round_event, player_bracket_pick, away_placeholder_pick, home_placeholder_pick, onPick, onSelectContest }:RoundEventCardProps) => {
|
|
34
34
|
//AWAY PLACEHOLDER
|
|
35
35
|
const round_width = width//width > 600 ? undefined : width / 2
|
|
36
|
+
const no_name = width < 195 ? true : false
|
|
36
37
|
const Colors = useColors();
|
|
37
38
|
const handleSelectAway = () => {
|
|
38
|
-
if(loading){ return }
|
|
39
|
+
if(loading){ return }
|
|
39
40
|
//Okay! Lets get the side_id
|
|
40
41
|
let side:'away' = 'away'
|
|
41
42
|
let side_id:string|undefined = undefined
|
|
@@ -144,7 +145,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
144
145
|
<View transparent>
|
|
145
146
|
{round_event?.away_side_id && away_placeholder_pick && away_placeholder_team ?
|
|
146
147
|
<View transparent style={{ padding:7, borderTopRightRadius:8, borderTopLeftRadius:8, borderBottomWidth:1, borderBottomColor:Colors.borders.light }}>
|
|
147
|
-
<Text size={10} theme='h2' color={away_placeholder_pick.result_ind=='win'?Colors.text.success:Colors.text.error}>{away_placeholder_team.market_name} {away_placeholder_team.name}</Text>
|
|
148
|
+
<Text size={10} theme='h2' color={away_placeholder_pick.result_ind=='win'?Colors.text.success:Colors.text.error}>{away_placeholder_team.market_name} {!no_name?away_placeholder_team.name:''}</Text>
|
|
148
149
|
</View>
|
|
149
150
|
:<></>}
|
|
150
151
|
<View style={{ flexDirection:'row', alignItems:'center', padding:12, borderTopRightRadius:!round_event?.away_side_id || !round_event.away_placeholder?8:0, borderTopLeftRadius:!round_event?.away_side_id || !round_event.away_placeholder?8:0 }}>
|
|
@@ -152,11 +153,11 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
152
153
|
<View transparent style={{ marginLeft:5 }}>
|
|
153
154
|
{renderButton('away')}
|
|
154
155
|
</View>
|
|
155
|
-
{round_event.event_id ?
|
|
156
|
+
{round_event.event_id && !no_name ?
|
|
156
157
|
<Text style={{ margin:5}} size={10} theme='h2'>{getScore(away_team?.team_id)}</Text>
|
|
157
158
|
:<></>}
|
|
158
159
|
</View>
|
|
159
|
-
<View transparent style={{ flex:1, marginLeft:
|
|
160
|
+
<View transparent style={{ flex:1, marginLeft:5, marginRight:0 }}>
|
|
160
161
|
{round_event.away_side_id && away_team ?
|
|
161
162
|
<View style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
|
|
162
163
|
<Image
|
|
@@ -168,7 +169,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
168
169
|
{compact ?
|
|
169
170
|
<Text style={{ flex:1 }} size={10} color={getPickColor('away', player_bracket_pick)} theme='h2'>{away_team.abbr}</Text>
|
|
170
171
|
:
|
|
171
|
-
<Text style={{ flex:1 }} size={10} color={getPickColor('away', player_bracket_pick)} theme='h2'>{away_team.market_name} {away_team.name}</Text>
|
|
172
|
+
<Text style={{ flex:1 }} size={10} color={getPickColor('away', player_bracket_pick)} theme='h2'>{away_team.market_name} {!no_name?away_team.name:''}</Text>
|
|
172
173
|
}
|
|
173
174
|
</View>
|
|
174
175
|
:
|
|
@@ -184,7 +185,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
184
185
|
{compact ?
|
|
185
186
|
<Text style={{ flex:1 }} size={10} theme='h1'>{away_placeholder_team.abbr}</Text>
|
|
186
187
|
:
|
|
187
|
-
<Text style={{ flex:1 }} size={10} theme='h1'>{away_placeholder_team.market_name} {away_placeholder_team.name}</Text>
|
|
188
|
+
<Text style={{ flex:1 }} size={10} theme='h1'>{away_placeholder_team.market_name} {!no_name?away_placeholder_team.name:''}</Text>
|
|
188
189
|
}
|
|
189
190
|
</View>
|
|
190
191
|
:
|
|
@@ -205,11 +206,11 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
205
206
|
<View transparent style={{ marginLeft:5 }}>
|
|
206
207
|
{renderButton('home')}
|
|
207
208
|
</View>
|
|
208
|
-
{round_event.event_id ?
|
|
209
|
+
{round_event.event_id && !no_name ?
|
|
209
210
|
<Text style={{ margin:5}} size={10} theme='h2'>{getScore(home_team?.team_id)}</Text>
|
|
210
211
|
:<></>}
|
|
211
212
|
</View>
|
|
212
|
-
<View transparent style={{ flex:1, marginLeft:
|
|
213
|
+
<View transparent style={{ flex:1, marginLeft:5 }}>
|
|
213
214
|
{round_event.home_side_id && home_team ?
|
|
214
215
|
<View transparent style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
|
|
215
216
|
<Image
|
|
@@ -221,7 +222,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
221
222
|
{compact ?
|
|
222
223
|
<Text style={{ flex:1 }} size={10} color={getPickColor('home', player_bracket_pick)} theme='h2'>{home_team.abbr}</Text>
|
|
223
224
|
:
|
|
224
|
-
<Text style={{ flex:1 }} size={10} color={getPickColor('home', player_bracket_pick)} theme='h2'>{home_team.market_name} {home_team.name}</Text>
|
|
225
|
+
<Text style={{ flex:1 }} size={10} color={getPickColor('home', player_bracket_pick)} theme='h2'>{home_team.market_name} {!no_name?home_team.name:''}</Text>
|
|
225
226
|
}
|
|
226
227
|
</View>
|
|
227
228
|
:
|
|
@@ -237,7 +238,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
237
238
|
{compact ?
|
|
238
239
|
<Text style={{ flex:1 }} size={10} theme='h2'>{home_placeholder_team.abbr}</Text>
|
|
239
240
|
:
|
|
240
|
-
<Text style={{ flex:1 }} size={10} theme='h2'>{home_placeholder_team.market_name} {home_placeholder_team.name}</Text>
|
|
241
|
+
<Text style={{ flex:1 }} size={10} theme='h2'>{home_placeholder_team.market_name} {!no_name?home_placeholder_team.name:''}</Text>
|
|
241
242
|
}
|
|
242
243
|
</View>
|
|
243
244
|
:
|
|
@@ -249,7 +250,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
249
250
|
</View>
|
|
250
251
|
{round_event?.home_side_id && home_placeholder_pick && home_placeholder_team?
|
|
251
252
|
<View transparent style={{ padding:7, borderBottomRightRadius:4, borderBottomLeftRadius:4, borderTopWidth:1, borderTopColor:Colors.borders.light }}>
|
|
252
|
-
<Text size={10} theme='h2' color={home_placeholder_pick.result_ind=='win'?Colors.text.success:Colors.text.error}>{home_placeholder_team.market_name} {home_placeholder_team.name}</Text>
|
|
253
|
+
<Text size={10} theme='h2' color={home_placeholder_pick.result_ind=='win'?Colors.text.success:Colors.text.error}>{home_placeholder_team.market_name} {!no_name?home_placeholder_team.name:''}</Text>
|
|
253
254
|
</View>
|
|
254
255
|
:<></>}
|
|
255
256
|
</View>
|
|
@@ -270,11 +271,11 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
270
271
|
<View transparent>
|
|
271
272
|
{round_event?.away_side_id && away_placeholder_pick && away_placeholder_team ?
|
|
272
273
|
<View transparent style={{ padding:7, borderTopRightRadius:8, borderTopLeftRadius:8, borderBottomWidth:1, borderBottomColor:Colors.borders.light }}>
|
|
273
|
-
<Text size={10} theme='h2' color={away_placeholder_pick.result_ind=='win'?Colors.text.success:Colors.text.error}>{away_placeholder_team.market_name} {away_placeholder_team.name}</Text>
|
|
274
|
+
<Text size={10} theme='h2' color={away_placeholder_pick.result_ind=='win'?Colors.text.success:Colors.text.error}>{away_placeholder_team.market_name} {!no_name?away_placeholder_team.name:''}</Text>
|
|
274
275
|
</View>
|
|
275
276
|
:<></>}
|
|
276
277
|
<View style={{ flexDirection:'row', alignItems:'center', padding:12, borderTopRightRadius:!round_event?.away_side_id || !round_event.away_placeholder?8:0, borderTopLeftRadius:!round_event?.away_side_id || !round_event.away_placeholder?8:0 }}>
|
|
277
|
-
<View transparent style={{ flex:1, marginRight:
|
|
278
|
+
<View transparent style={{ flex:1, marginRight:5, marginLeft:0 }}>
|
|
278
279
|
{round_event.away_side_id && away_team ?
|
|
279
280
|
<View style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
|
|
280
281
|
<Image
|
|
@@ -286,7 +287,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
286
287
|
{compact ?
|
|
287
288
|
<Text style={{ flex:1 }} size={10} color={getPickColor('away', player_bracket_pick)} theme='h2'>{away_team.abbr}</Text>
|
|
288
289
|
:
|
|
289
|
-
<Text style={{ flex:1 }} size={10} color={getPickColor('away', player_bracket_pick)} theme='h2'>{away_team.market_name} {away_team.name}</Text>
|
|
290
|
+
<Text style={{ flex:1 }} size={10} color={getPickColor('away', player_bracket_pick)} theme='h2'>{away_team.market_name} {!no_name?away_team.name:''}</Text>
|
|
290
291
|
}
|
|
291
292
|
</View>
|
|
292
293
|
:
|
|
@@ -302,7 +303,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
302
303
|
{compact ?
|
|
303
304
|
<Text style={{ flex:1 }} size={10} theme='h1'>{away_placeholder_team.abbr}</Text>
|
|
304
305
|
:
|
|
305
|
-
<Text style={{ flex:1 }} size={10} theme='h1'>{away_placeholder_team.market_name} {away_placeholder_team.name}</Text>
|
|
306
|
+
<Text style={{ flex:1 }} size={10} theme='h1'>{away_placeholder_team.market_name} {!no_name?away_placeholder_team.name:''}</Text>
|
|
306
307
|
}
|
|
307
308
|
</View>
|
|
308
309
|
:
|
|
@@ -312,7 +313,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
312
313
|
}
|
|
313
314
|
</View>
|
|
314
315
|
<View transparent style={{ flexDirection:'row', alignItems:'center', borderLeftWidth:1, borderLeftColor:Colors.borders.light }}>
|
|
315
|
-
{round_event.event_id ?
|
|
316
|
+
{round_event.event_id && !no_name ?
|
|
316
317
|
<Text style={{ margin:5}} size={10} theme='h2'>{getScore(away_team?.team_id)}</Text>
|
|
317
318
|
:<></>}
|
|
318
319
|
<View transparent style={{ marginLeft:5 }}>
|
|
@@ -327,7 +328,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
327
328
|
<View transparent>
|
|
328
329
|
<View style={{ flexDirection:'row', alignItems:'center', padding:12, borderBottomRightRadius:!round_event?.home_side_id || !round_event.home_placeholder?8:0, borderBottomLeftRadius:!round_event?.home_side_id || !round_event.home_placeholder?8:0 }}>
|
|
329
330
|
|
|
330
|
-
<View transparent style={{ flex:1, marginRight:
|
|
331
|
+
<View transparent style={{ flex:1, marginRight:5 }}>
|
|
331
332
|
{round_event.home_side_id && home_team ?
|
|
332
333
|
<View transparent style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
|
|
333
334
|
<Image
|
|
@@ -339,7 +340,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
339
340
|
{compact ?
|
|
340
341
|
<Text style={{ flex:1 }} size={10} color={getPickColor('home', player_bracket_pick)} theme='h2'>{home_team.abbr}</Text>
|
|
341
342
|
:
|
|
342
|
-
<Text style={{ flex:1 }} size={10} color={getPickColor('home', player_bracket_pick)} theme='h2'>{home_team.market_name} {home_team.name}</Text>
|
|
343
|
+
<Text style={{ flex:1 }} size={10} color={getPickColor('home', player_bracket_pick)} theme='h2'>{home_team.market_name} {!no_name?home_team.name:''}</Text>
|
|
343
344
|
}
|
|
344
345
|
</View>
|
|
345
346
|
:
|
|
@@ -355,7 +356,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
355
356
|
{compact ?
|
|
356
357
|
<Text style={{ flex:1 }} size={10} theme='h2'>{home_placeholder_team.abbr}</Text>
|
|
357
358
|
:
|
|
358
|
-
<Text style={{ flex:1 }} size={10} theme='h2'>{home_placeholder_team.market_name} {home_placeholder_team.name}</Text>
|
|
359
|
+
<Text style={{ flex:1 }} size={10} theme='h2'>{home_placeholder_team.market_name} {!no_name?home_placeholder_team.name:''}</Text>
|
|
359
360
|
}
|
|
360
361
|
</View>
|
|
361
362
|
:
|
|
@@ -365,7 +366,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
365
366
|
}
|
|
366
367
|
</View>
|
|
367
368
|
<View transparent style={{ flexDirection:'row', alignItems:'center', borderLeftWidth:1, borderLeftColor:Colors.borders.light }}>
|
|
368
|
-
{round_event.event_id ?
|
|
369
|
+
{round_event.event_id && !no_name ?
|
|
369
370
|
<Text style={{ margin:5}} size={10} theme='h2'>{getScore(home_team?.team_id)}</Text>
|
|
370
371
|
:<></>}
|
|
371
372
|
<View transparent style={{ marginLeft:5 }}>
|
|
@@ -375,7 +376,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
375
376
|
</View>
|
|
376
377
|
{round_event?.home_side_id && home_placeholder_pick && home_placeholder_team?
|
|
377
378
|
<View transparent style={{ padding:7, borderBottomRightRadius:4, borderBottomLeftRadius:4, borderTopWidth:1, borderTopColor:Colors.borders.light }}>
|
|
378
|
-
<Text size={10} theme='h2' color={home_placeholder_pick.result_ind=='win'?Colors.text.success:Colors.text.error}>{home_placeholder_team.market_name} {home_placeholder_team.name}</Text>
|
|
379
|
+
<Text size={10} theme='h2' color={home_placeholder_pick.result_ind=='win'?Colors.text.success:Colors.text.error}>{home_placeholder_team.market_name} {!no_name?home_placeholder_team.name:''}</Text>
|
|
379
380
|
</View>
|
|
380
381
|
:<></>}
|
|
381
382
|
</View>
|
|
@@ -387,7 +388,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
387
388
|
return (
|
|
388
389
|
<View transparent float style={{ flexDirection:'row', borderRadius:8, minWidth:125, width:round_width }}>
|
|
389
390
|
{!compact && orientation != 'left' && onSelectContest ?
|
|
390
|
-
<Button style={{ padding:
|
|
391
|
+
<Button style={{ padding:8, justifyContent:'center', alignItems:'center', borderRightWidth:1, borderColor:Colors.borders.light, borderRadius:0, borderTopLeftRadius:8, borderBottomLeftRadius:8 }}
|
|
391
392
|
onPress={() => onSelectContest(round_event, player_bracket_pick, away_placeholder_pick, home_placeholder_pick)}>
|
|
392
393
|
<Icons.AlertIcon size={16} color={Colors.text.action} />
|
|
393
394
|
</Button>
|
|
@@ -409,7 +410,7 @@ const RoundEventCard = ({ event, loading, orientation, compact, bracket, away_te
|
|
|
409
410
|
:<></>}
|
|
410
411
|
</View>
|
|
411
412
|
{!compact && orientation == 'left' && onSelectContest ?
|
|
412
|
-
<Button style={{ padding:
|
|
413
|
+
<Button style={{ padding:8, justifyContent:'center', alignItems:'center', borderLeftWidth:1, borderColor:Colors.borders.light, borderRadius:0, borderTopRightRadius:8, borderBottomRightRadius:8 }}
|
|
413
414
|
onPress={() => onSelectContest(round_event, player_bracket_pick, away_placeholder_pick, home_placeholder_pick)}>
|
|
414
415
|
<Icons.AlertIcon size={16} color={Colors.text.action} />
|
|
415
416
|
</Button>
|
|
@@ -30,6 +30,7 @@ const BracketPlay = ({ player, view_mode, width, bracket_id, onSelectContest, pl
|
|
|
30
30
|
let round_margin = 4
|
|
31
31
|
const [ final_four_size, setFinalFourSize ] = useState({ height: 0, width:0 });
|
|
32
32
|
const [ bracket_size, setBracketSize ] = useState({ height:0, width:0, x: 0, y: 0 });
|
|
33
|
+
const [ silent_round, setSilentRound ] = useState<BracketRoundProps>();
|
|
33
34
|
const [ play_data, setPlayData ] = useState<{
|
|
34
35
|
play_loading:boolean,
|
|
35
36
|
player_bracket?:PlayerBracketProps,
|
|
@@ -64,6 +65,12 @@ const BracketPlay = ({ player, view_mode, width, bracket_id, onSelectContest, pl
|
|
|
64
65
|
const no_group_rounds = bracket_rounds.filter(br => no_group_round_events.includes(br.bracket_round_id));
|
|
65
66
|
const { round_statuses, group_statuses } = BracketCompetitionHelpers.getPlayerBracketStatus(bracket_rounds, bracket_groups, round_events, player_bracket_picks);
|
|
66
67
|
|
|
68
|
+
let visible_round_events = [ ...round_events ];
|
|
69
|
+
if(width < 1000 && !selected_round && silent_round && silent_round.round_number > 1){
|
|
70
|
+
let back_rounds = bracket_rounds.filter(br => br.round_number < silent_round.round_number).map(br => br.bracket_round_id.toString())
|
|
71
|
+
visible_round_events = visible_round_events.filter(re => !back_rounds.includes(re.bracket_round_id.toString()))
|
|
72
|
+
}
|
|
73
|
+
|
|
67
74
|
const champion_team = player_bracket?.champion_id_type == 'team' ? teams.find(t => t.team_id == player_bracket?.champion_id) : undefined
|
|
68
75
|
const champion_athlete = player_bracket?.champion_id_type == 'athlete' ? athletes.find(a => a.athlete_id == player_bracket?.champion_id) : undefined
|
|
69
76
|
|
|
@@ -80,6 +87,9 @@ const BracketPlay = ({ player, view_mode, width, bracket_id, onSelectContest, pl
|
|
|
80
87
|
const right_final_four = final_four_events.find(ffe => ffe.orientation == 'right');
|
|
81
88
|
const championship = final_four_events.find(ffe => ffe.championship);
|
|
82
89
|
|
|
90
|
+
const round_actions = BracketCompetitionHelpers.calcRoundActions(bracket_rounds, round_width, 0);
|
|
91
|
+
|
|
92
|
+
|
|
83
93
|
useEffect(() => {
|
|
84
94
|
if(!bracket_id){ return }
|
|
85
95
|
getData(bracket_id)
|
|
@@ -195,7 +205,7 @@ const BracketPlay = ({ player, view_mode, width, bracket_id, onSelectContest, pl
|
|
|
195
205
|
<BracketRoundSection
|
|
196
206
|
round_event_loading={round_event_loading}
|
|
197
207
|
bracket_round={data.item}
|
|
198
|
-
round_events={
|
|
208
|
+
round_events={visible_round_events}
|
|
199
209
|
selected={selected}
|
|
200
210
|
active_bracket_group_id={data.bracket_group_id || selected_group?.bracket_group_id}
|
|
201
211
|
bracket={bracket}
|
|
@@ -326,7 +336,14 @@ const BracketPlay = ({ player, view_mode, width, bracket_id, onSelectContest, pl
|
|
|
326
336
|
/>
|
|
327
337
|
</View>
|
|
328
338
|
<ScrollView>
|
|
329
|
-
<ScrollView horizontal style={{ flexDirection:'row', padding:10 }}
|
|
339
|
+
<ScrollView horizontal style={{ flexDirection:'row', padding:10 }} scrollEventThrottle={16} onScroll={(ev) => {
|
|
340
|
+
if(width >= 1000){ return }
|
|
341
|
+
const {contentOffset} = ev.nativeEvent;
|
|
342
|
+
const round_action = round_actions.find(ra => ra.location_start <= contentOffset.x && ra.location_end >= contentOffset.x);
|
|
343
|
+
if(round_action && (!silent_round || silent_round.bracket_round_id != round_action?.bracket_round.bracket_round_id)){
|
|
344
|
+
setSilentRound(round_action.bracket_round)
|
|
345
|
+
}
|
|
346
|
+
}}>
|
|
330
347
|
<View transparent>
|
|
331
348
|
{width > 1000 && !selected_round && !selected_group ?
|
|
332
349
|
<View onLayout={(ev) => {
|
package/src/Bracket/index.tsx
CHANGED
|
@@ -322,8 +322,8 @@ const BracketRoom = ({ player_id, hide_home, restrict_competition, width, height
|
|
|
322
322
|
animationType={view_mode == 'desktop' ? 'fade' : 'slide'}
|
|
323
323
|
style={{ flex:1 }}
|
|
324
324
|
>
|
|
325
|
-
<View type='blur' style={view_mode == 'desktop' ? { flex:1, justifyContent:'center', alignItems:'center' } : { flex:1, justifyContent:'flex-end', padding:10, paddingBottom:(insets?.bottom ?? 0)+10 }}>
|
|
326
|
-
<View float style={view_mode=='desktop'?{ height:height ?? 700, width:500 }:{
|
|
325
|
+
<View type='blur' style={view_mode == 'desktop' ? { flex:1, justifyContent:'center', alignItems:'center' } : { flex:1, justifyContent:'flex-end', padding:10, paddingTop:(insets?.top ?? 0) + 10, paddingBottom:(insets?.bottom ?? 0)+10 }}>
|
|
326
|
+
<View float style={view_mode=='desktop'?{ height:height ?? 700, width:500 }:{ flex:1 }}>
|
|
327
327
|
<View style={{ flex:1 }}>
|
|
328
328
|
{active_competition ?
|
|
329
329
|
<CompetitionLeaderboard
|
|
@@ -363,7 +363,7 @@ const BracketRoom = ({ player_id, hide_home, restrict_competition, width, height
|
|
|
363
363
|
/>
|
|
364
364
|
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
365
365
|
<Text theme='h2' color={Colors.text.white}>{active_competition.competition_name}</Text>
|
|
366
|
-
<Text style={{ marginTop:3 }} theme='description' color={Colors.text.white}>{active_competition.
|
|
366
|
+
<Text style={{ marginTop:3 }} theme='description' color={Colors.text.white}>{active_competition.competition_description}</Text>
|
|
367
367
|
</View>
|
|
368
368
|
|
|
369
369
|
<Button
|
|
@@ -381,7 +381,7 @@ const BracketRoom = ({ player_id, hide_home, restrict_competition, width, height
|
|
|
381
381
|
</Button>
|
|
382
382
|
</View>
|
|
383
383
|
:<></>}
|
|
384
|
-
<View style={{
|
|
384
|
+
<View style={{ flex:1 }}>
|
|
385
385
|
|
|
386
386
|
{active_bracket_id ?
|
|
387
387
|
<BracketCompetitionActions
|
|
@@ -483,7 +483,7 @@ const BracketRoom = ({ player_id, hide_home, restrict_competition, width, height
|
|
|
483
483
|
/>
|
|
484
484
|
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
485
485
|
<Text theme='h2' color={Colors.text.white}>{active_competition.competition_name}</Text>
|
|
486
|
-
<Text style={{ marginTop:3 }} theme='description' color={Colors.text.white}>{active_competition.
|
|
486
|
+
<Text style={{ marginTop:3 }} theme='description' color={Colors.text.white}>{active_competition.competition_description}</Text>
|
|
487
487
|
</View>
|
|
488
488
|
<Button
|
|
489
489
|
float
|