be-components 3.4.2 → 3.4.3

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 (116) hide show
  1. package/lib/commonjs/Components/Icons.js +30 -0
  2. package/lib/commonjs/Components/Icons.js.map +1 -1
  3. package/lib/commonjs/Components/SearchBox.js +17 -23
  4. package/lib/commonjs/Components/SearchBox.js.map +1 -1
  5. package/lib/commonjs/Components/Themed.js +2 -2
  6. package/lib/commonjs/Components/Themed.js.map +1 -1
  7. package/lib/commonjs/Engage/components/BracketCompetitionCard.js +75 -58
  8. package/lib/commonjs/Engage/components/BracketCompetitionCard.js.map +1 -1
  9. package/lib/commonjs/Engage/components/CompanyCard.js +31 -26
  10. package/lib/commonjs/Engage/components/CompanyCard.js.map +1 -1
  11. package/lib/commonjs/Engage/components/CompetitionCard.js +85 -68
  12. package/lib/commonjs/Engage/components/CompetitionCard.js.map +1 -1
  13. package/lib/commonjs/Engage/components/EngageHeader.js +62 -36
  14. package/lib/commonjs/Engage/components/EngageHeader.js.map +1 -1
  15. package/lib/commonjs/Engage/components/PrivateCodePrompt.js +47 -45
  16. package/lib/commonjs/Engage/components/PrivateCodePrompt.js.map +1 -1
  17. package/lib/commonjs/Engage/components/SquaresCompetitionCard.js +69 -56
  18. package/lib/commonjs/Engage/components/SquaresCompetitionCard.js.map +1 -1
  19. package/lib/commonjs/Engage/index.js +262 -259
  20. package/lib/commonjs/Engage/index.js.map +1 -1
  21. package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js +69 -46
  22. package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
  23. package/lib/commonjs/constants/styles.js +1 -1
  24. package/lib/commonjs/constants/styles.js.map +1 -1
  25. package/lib/commonjs/constants/useColors.js +6 -3
  26. package/lib/commonjs/constants/useColors.js.map +1 -1
  27. package/lib/module/Components/Icons.js +30 -0
  28. package/lib/module/Components/Icons.js.map +1 -1
  29. package/lib/module/Components/SearchBox.js +11 -17
  30. package/lib/module/Components/SearchBox.js.map +1 -1
  31. package/lib/module/Components/Themed.js +2 -2
  32. package/lib/module/Components/Themed.js.map +1 -1
  33. package/lib/module/Engage/components/BracketCompetitionCard.js +52 -35
  34. package/lib/module/Engage/components/BracketCompetitionCard.js.map +1 -1
  35. package/lib/module/Engage/components/CompanyCard.js +27 -21
  36. package/lib/module/Engage/components/CompanyCard.js.map +1 -1
  37. package/lib/module/Engage/components/CompetitionCard.js +57 -40
  38. package/lib/module/Engage/components/CompetitionCard.js.map +1 -1
  39. package/lib/module/Engage/components/EngageHeader.js +53 -27
  40. package/lib/module/Engage/components/EngageHeader.js.map +1 -1
  41. package/lib/module/Engage/components/PrivateCodePrompt.js +36 -33
  42. package/lib/module/Engage/components/PrivateCodePrompt.js.map +1 -1
  43. package/lib/module/Engage/components/SquaresCompetitionCard.js +51 -38
  44. package/lib/module/Engage/components/SquaresCompetitionCard.js.map +1 -1
  45. package/lib/module/Engage/index.js +262 -259
  46. package/lib/module/Engage/index.js.map +1 -1
  47. package/lib/module/MarketComponents/components/TeamEventMarket/index.js +69 -46
  48. package/lib/module/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
  49. package/lib/module/constants/styles.js +1 -1
  50. package/lib/module/constants/styles.js.map +1 -1
  51. package/lib/module/constants/useColors.js +6 -3
  52. package/lib/module/constants/useColors.js.map +1 -1
  53. package/lib/typescript/lib/commonjs/Components/Icons.d.ts +5 -0
  54. package/lib/typescript/lib/commonjs/Components/Icons.d.ts.map +1 -1
  55. package/lib/typescript/lib/commonjs/Components/SearchBox.d.ts.map +1 -1
  56. package/lib/typescript/lib/commonjs/Engage/components/BracketCompetitionCard.d.ts.map +1 -1
  57. package/lib/typescript/lib/commonjs/Engage/components/CompanyCard.d.ts.map +1 -1
  58. package/lib/typescript/lib/commonjs/Engage/components/CompetitionCard.d.ts.map +1 -1
  59. package/lib/typescript/lib/commonjs/Engage/components/EngageHeader.d.ts.map +1 -1
  60. package/lib/typescript/lib/commonjs/Engage/components/PrivateCodePrompt.d.ts +1 -2
  61. package/lib/typescript/lib/commonjs/Engage/components/PrivateCodePrompt.d.ts.map +1 -1
  62. package/lib/typescript/lib/commonjs/Engage/components/SquaresCompetitionCard.d.ts.map +1 -1
  63. package/lib/typescript/lib/commonjs/Engage/index.d.ts +2 -1
  64. package/lib/typescript/lib/commonjs/Engage/index.d.ts.map +1 -1
  65. package/lib/typescript/lib/commonjs/constants/styles.d.ts +1 -1
  66. package/lib/typescript/lib/commonjs/constants/useColors.d.ts +5 -4
  67. package/lib/typescript/lib/commonjs/constants/useColors.d.ts.map +1 -1
  68. package/lib/typescript/lib/module/Components/Icons.d.ts +5 -0
  69. package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
  70. package/lib/typescript/lib/module/Components/SearchBox.d.ts +1 -2
  71. package/lib/typescript/lib/module/Components/SearchBox.d.ts.map +1 -1
  72. package/lib/typescript/lib/module/Engage/components/BracketCompetitionCard.d.ts +1 -2
  73. package/lib/typescript/lib/module/Engage/components/BracketCompetitionCard.d.ts.map +1 -1
  74. package/lib/typescript/lib/module/Engage/components/CompanyCard.d.ts +1 -2
  75. package/lib/typescript/lib/module/Engage/components/CompanyCard.d.ts.map +1 -1
  76. package/lib/typescript/lib/module/Engage/components/CompetitionCard.d.ts +1 -2
  77. package/lib/typescript/lib/module/Engage/components/CompetitionCard.d.ts.map +1 -1
  78. package/lib/typescript/lib/module/Engage/components/EngageHeader.d.ts +1 -2
  79. package/lib/typescript/lib/module/Engage/components/EngageHeader.d.ts.map +1 -1
  80. package/lib/typescript/lib/module/Engage/components/PrivateCodePrompt.d.ts +2 -4
  81. package/lib/typescript/lib/module/Engage/components/PrivateCodePrompt.d.ts.map +1 -1
  82. package/lib/typescript/lib/module/Engage/components/SquaresCompetitionCard.d.ts +1 -2
  83. package/lib/typescript/lib/module/Engage/components/SquaresCompetitionCard.d.ts.map +1 -1
  84. package/lib/typescript/lib/module/Engage/index.d.ts +3 -3
  85. package/lib/typescript/lib/module/Engage/index.d.ts.map +1 -1
  86. package/lib/typescript/lib/module/constants/useColors.d.ts +71 -0
  87. package/lib/typescript/lib/module/constants/useColors.d.ts.map +1 -1
  88. package/lib/typescript/src/Components/Icons.d.ts +1 -0
  89. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  90. package/lib/typescript/src/Components/SearchBox.d.ts.map +1 -1
  91. package/lib/typescript/src/Engage/components/BracketCompetitionCard.d.ts.map +1 -1
  92. package/lib/typescript/src/Engage/components/CompanyCard.d.ts.map +1 -1
  93. package/lib/typescript/src/Engage/components/CompetitionCard.d.ts.map +1 -1
  94. package/lib/typescript/src/Engage/components/EngageHeader.d.ts.map +1 -1
  95. package/lib/typescript/src/Engage/components/PrivateCodePrompt.d.ts +1 -2
  96. package/lib/typescript/src/Engage/components/PrivateCodePrompt.d.ts.map +1 -1
  97. package/lib/typescript/src/Engage/components/SquaresCompetitionCard.d.ts.map +1 -1
  98. package/lib/typescript/src/Engage/index.d.ts +5 -1
  99. package/lib/typescript/src/Engage/index.d.ts.map +1 -1
  100. package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -1
  101. package/lib/typescript/src/constants/useColors.d.ts +71 -0
  102. package/lib/typescript/src/constants/useColors.d.ts.map +1 -1
  103. package/package.json +1 -1
  104. package/src/Components/Icons.tsx +16 -0
  105. package/src/Components/SearchBox.tsx +11 -13
  106. package/src/Components/Themed.tsx +3 -3
  107. package/src/Engage/components/BracketCompetitionCard.tsx +34 -31
  108. package/src/Engage/components/CompanyCard.tsx +17 -19
  109. package/src/Engage/components/CompetitionCard.tsx +40 -35
  110. package/src/Engage/components/EngageHeader.tsx +30 -29
  111. package/src/Engage/components/PrivateCodePrompt.tsx +29 -33
  112. package/src/Engage/components/SquaresCompetitionCard.tsx +33 -29
  113. package/src/Engage/index.tsx +191 -187
  114. package/src/MarketComponents/components/TeamEventMarket/index.tsx +55 -44
  115. package/src/constants/styles.ts +1 -1
  116. package/src/constants/useColors.tsx +7 -5
@@ -1,10 +1,8 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { View, ActivityIndicator, FlatList, ScrollView } from 'react-native';
3
- import Colors from '../constants/colors';
2
+ import { ActivityIndicator, FlatList, KeyboardAvoidingView, Modal, Platform } from 'react-native';
4
3
  import { EngageApi, EngageHelpers } from './api';
5
4
  import CompetitionCard from './components/CompetitionCard';
6
- import { view_styles } from '../constants/styles';
7
- import { Button, Icons, Text } from '../Components';
5
+ import { Icons, Toggle } from '../Components';
8
6
  import SquaresCompetitionCard from './components/SquaresCompetitionCard';
9
7
  import BracketCompetitionCard from './components/BracketCompetitionCard';
10
8
  import moment from 'moment-mini';
@@ -12,7 +10,11 @@ import SocketManager from '../Socket';
12
10
  import SeasonCard from './components/SeasonCard';
13
11
  import EngageHeader from './components/EngageHeader';
14
12
  import PrivateCodePrompt from './components/PrivateCodePrompt';
13
+ import { Button, Text, View } from '../Components/Themed';
14
+ import { useColors } from '../constants/useColors';
15
+ const engage_sections = ['header', 'toggle', 'private', 'engagements'];
15
16
  const EngageModule = ({
17
+ insets,
16
18
  onSelectBracketCompetition,
17
19
  onSelectCompetition,
18
20
  onSelectSquaresCompetition,
@@ -63,6 +65,7 @@ const EngageModule = ({
63
65
  companies,
64
66
  players
65
67
  } = module_data;
68
+ const Colors = useColors();
66
69
  useEffect(() => {
67
70
  EngageApi.setEnvironment();
68
71
  getDataFromServer();
@@ -116,7 +119,12 @@ const EngageModule = ({
116
119
  const admin = players.find(p => p.player_id == data.item.admin_id);
117
120
  const company = companies.find(c => c.company_id == data.item.company_id);
118
121
  const event = events.find(e => e.event_id == data.item.event_id);
119
- return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(SquaresCompetitionCard, {
122
+ return /*#__PURE__*/React.createElement(View, {
123
+ transparent: true,
124
+ style: {
125
+ margin: 10
126
+ }
127
+ }, /*#__PURE__*/React.createElement(SquaresCompetitionCard, {
120
128
  squares_competition: data.item,
121
129
  company: company,
122
130
  admin: admin,
@@ -133,7 +141,12 @@ const EngageModule = ({
133
141
  if (!competition_result_type) {
134
142
  return /*#__PURE__*/React.createElement(React.Fragment, null);
135
143
  }
136
- return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(BracketCompetitionCard, {
144
+ return /*#__PURE__*/React.createElement(View, {
145
+ transparent: true,
146
+ style: {
147
+ margin: 10
148
+ }
149
+ }, /*#__PURE__*/React.createElement(BracketCompetitionCard, {
137
150
  bracket_competition: data.item,
138
151
  company: company,
139
152
  competition_result_type: competition_result_type,
@@ -159,7 +172,12 @@ const EngageModule = ({
159
172
  if (!competition_type || !competition_result_type) {
160
173
  return /*#__PURE__*/React.createElement(React.Fragment, null);
161
174
  }
162
- return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(CompetitionCard, {
175
+ return /*#__PURE__*/React.createElement(View, {
176
+ transparent: true,
177
+ style: {
178
+ margin: 10
179
+ }
180
+ }, /*#__PURE__*/React.createElement(CompetitionCard, {
163
181
  competition: data.item,
164
182
  company: company,
165
183
  competition_type: competition_type,
@@ -169,29 +187,216 @@ const EngageModule = ({
169
187
  onCompetitionSelect: c => onSelectCompetition(c)
170
188
  }));
171
189
  };
172
- if (loading) {
173
- return /*#__PURE__*/React.createElement(View, {
174
- style: {
175
- flex: 1,
176
- backgroundColor: Colors.shades.white
177
- }
178
- }, /*#__PURE__*/React.createElement(ActivityIndicator, {
179
- style: {
180
- padding: 20,
181
- alignSelf: 'center'
182
- },
183
- size: "large",
184
- color: Colors.brand.midnight
185
- }));
186
- }
187
- return /*#__PURE__*/React.createElement(View, {
188
- style: {
189
- flex: 1,
190
- backgroundColor: Colors.shades.white
190
+ const renderSections = data => {
191
+ switch (data.item) {
192
+ case 'header':
193
+ return /*#__PURE__*/React.createElement(EngageHeader, {
194
+ companies: companies,
195
+ width: module_size.width,
196
+ onManage: onManage,
197
+ onEvent: onEvent,
198
+ onSelectCompany: onSelectCompany
199
+ });
200
+ case 'toggle':
201
+ return /*#__PURE__*/React.createElement(View, {
202
+ float: true,
203
+ style: {
204
+ margin: 10
205
+ }
206
+ }, /*#__PURE__*/React.createElement(Toggle, {
207
+ background_color: Colors.views.header,
208
+ inactive_title_color: Colors.text.h1,
209
+ options: [{
210
+ key: 'competitions',
211
+ label: 'Competitions'
212
+ }, {
213
+ key: 'brackets',
214
+ label: 'Brackets'
215
+ }, {
216
+ key: 'squares',
217
+ label: 'Squares'
218
+ }],
219
+ selected_option: active_tab,
220
+ onSelectOption: option => setActiveTab(option)
221
+ }));
222
+ case 'private':
223
+ return /*#__PURE__*/React.createElement(View, {
224
+ type: "header",
225
+ style: {
226
+ padding: 10,
227
+ marginBottom: 10,
228
+ flexDirection: 'row',
229
+ alignItems: 'center'
230
+ }
231
+ }, /*#__PURE__*/React.createElement(Icons.EyeOffIcon, {
232
+ size: 18,
233
+ color: Colors.text.h1
234
+ }), /*#__PURE__*/React.createElement(View, {
235
+ transparent: true,
236
+ style: {
237
+ flex: 1,
238
+ marginLeft: 10
239
+ }
240
+ }, /*#__PURE__*/React.createElement(Text, {
241
+ theme: "h1"
242
+ }, "Find Private"), /*#__PURE__*/React.createElement(Text, {
243
+ style: {
244
+ marginTop: 3
245
+ },
246
+ theme: "description"
247
+ }, "Did you receive a private code? Enter it here.")), /*#__PURE__*/React.createElement(Button, {
248
+ title: "ENTER PRIVATE CODE",
249
+ type: "text",
250
+ onPress: () => setShowCodePrompt(true)
251
+ }));
252
+ case 'engagements':
253
+ return /*#__PURE__*/React.createElement(View, {
254
+ transparent: true
255
+ }, active_tab == 'competitions' ? /*#__PURE__*/React.createElement(View, {
256
+ transparent: true
257
+ }, competition_seasons.length > 0 ? /*#__PURE__*/React.createElement(View, {
258
+ transparent: true,
259
+ style: {
260
+ marginTop: 10
261
+ }
262
+ }, /*#__PURE__*/React.createElement(View, {
263
+ type: "header",
264
+ style: {
265
+ flexDirection: 'row',
266
+ alignItems: 'center',
267
+ padding: 10
268
+ }
269
+ }, /*#__PURE__*/React.createElement(View, {
270
+ style: {
271
+ flex: 1
272
+ }
273
+ }, /*#__PURE__*/React.createElement(Text, {
274
+ theme: "h1"
275
+ }, "Public Seasons"), /*#__PURE__*/React.createElement(Text, {
276
+ style: {
277
+ marginTop: 3
278
+ },
279
+ theme: "description"
280
+ }, "Seasons are multi-competition contests. Payouts are split between each competition and the season long winners.")), onCreateSeason ? /*#__PURE__*/React.createElement(Button, {
281
+ title: "NEW",
282
+ type: "success",
283
+ onPress: () => onCreateSeason()
284
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null)), /*#__PURE__*/React.createElement(FlatList, {
285
+ data: competition_seasons.sort((a, b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix()),
286
+ horizontal: true,
287
+ keyExtractor: item => item.competition_season_id.toString(),
288
+ renderItem: renderSeasons
289
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
290
+ transparent: true,
291
+ style: {
292
+ marginBottom: 15,
293
+ marginTop: 10
294
+ }
295
+ }, /*#__PURE__*/React.createElement(View, {
296
+ type: "header",
297
+ style: {
298
+ flexDirection: 'row',
299
+ alignItems: 'center',
300
+ padding: 10
301
+ }
302
+ }, /*#__PURE__*/React.createElement(View, {
303
+ transparent: true,
304
+ style: {
305
+ flex: 1
306
+ }
307
+ }, /*#__PURE__*/React.createElement(Text, {
308
+ theme: "h1"
309
+ }, "Public Competitions"), /*#__PURE__*/React.createElement(Text, {
310
+ style: {
311
+ marginTop: 3
312
+ },
313
+ theme: "description"
314
+ }, "Below are available pick-em and wager based competitions. All competitions are offered with 0 fees. All ticket sales are paid out to the winners!")), onCreateCompetition ? /*#__PURE__*/React.createElement(Button, {
315
+ title: "NEW",
316
+ type: "success",
317
+ onPress: () => onCreateCompetition()
318
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null)), /*#__PURE__*/React.createElement(FlatList, {
319
+ data: competitions.sort((a, b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix()),
320
+ renderItem: renderCompetitions,
321
+ keyExtractor: item => item.competition_id.toString()
322
+ }))) : active_tab == 'squares' ? /*#__PURE__*/React.createElement(View, {
323
+ transparent: true
324
+ }, /*#__PURE__*/React.createElement(View, {
325
+ transparent: true,
326
+ style: {
327
+ marginBottom: 15,
328
+ marginTop: 10
329
+ }
330
+ }, /*#__PURE__*/React.createElement(View, {
331
+ type: "header",
332
+ style: {
333
+ flexDirection: 'row',
334
+ alignItems: 'center',
335
+ padding: 10
336
+ }
337
+ }, /*#__PURE__*/React.createElement(View, {
338
+ transparent: true,
339
+ style: {
340
+ flex: 1
341
+ }
342
+ }, /*#__PURE__*/React.createElement(Text, {
343
+ theme: "h1"
344
+ }, "Public Auction Squares"), /*#__PURE__*/React.createElement(Text, {
345
+ style: {
346
+ marginTop: 3
347
+ },
348
+ theme: "description"
349
+ }, "Below are available squares competitions. Bid on squares until the auction period ends. Win $ and prizes when your square hits at the end of each quarter!")), onCreateSquares ? /*#__PURE__*/React.createElement(Button, {
350
+ title: "NEW",
351
+ type: "success",
352
+ onPress: () => onCreateSquares()
353
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null))), /*#__PURE__*/React.createElement(FlatList, {
354
+ data: squares_competitions.sort((a, b) => moment(a.begin_datetime).unix() - moment(b.begin_datetime).unix()),
355
+ renderItem: renderSquaresCompetitions,
356
+ keyExtractor: item => item.sq_comp_id.toString()
357
+ })) : active_tab == 'brackets' ? /*#__PURE__*/React.createElement(View, {
358
+ transparent: true
359
+ }, /*#__PURE__*/React.createElement(View, {
360
+ transparent: true,
361
+ style: {
362
+ marginBottom: 15,
363
+ marginTop: 10
364
+ }
365
+ }, /*#__PURE__*/React.createElement(View, {
366
+ type: "header",
367
+ style: {
368
+ flexDirection: 'row',
369
+ alignItems: 'center',
370
+ padding: 10
371
+ }
372
+ }, /*#__PURE__*/React.createElement(View, {
373
+ transparent: true,
374
+ style: {
375
+ flex: 1
376
+ }
377
+ }, /*#__PURE__*/React.createElement(Text, {
378
+ theme: "h1"
379
+ }, "Public Bracket Competitions"), /*#__PURE__*/React.createElement(Text, {
380
+ style: {
381
+ marginTop: 3
382
+ },
383
+ theme: "description"
384
+ }, "Below are available bracket competitions. All competitions are offered with 0 fees. All ticket sales are paid out to the winners!")), onCreateBracketCompetition ? /*#__PURE__*/React.createElement(Button, {
385
+ title: "NEW",
386
+ type: "success",
387
+ onPress: () => onCreateBracketCompetition()
388
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null))), /*#__PURE__*/React.createElement(FlatList, {
389
+ data: bracket_competitions.sort((a, b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix()),
390
+ renderItem: renderBracketCompetitions,
391
+ keyExtractor: item => item.bracket_competition_id.toString()
392
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null));
393
+ default:
394
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
191
395
  }
192
- }, /*#__PURE__*/React.createElement(ScrollView, {
396
+ };
397
+ return /*#__PURE__*/React.createElement(View, {
193
398
  style: {
194
- flex: 1
399
+ flexGrow: 1
195
400
  },
196
401
  onLayout: ev => {
197
402
  const {
@@ -203,248 +408,32 @@ const EngageModule = ({
203
408
  height
204
409
  });
205
410
  }
206
- }, /*#__PURE__*/React.createElement(EngageHeader, {
207
- companies: companies,
208
- width: module_size.width,
209
- onManage: onManage,
210
- onEvent: onEvent,
211
- onSelectCompany: onSelectCompany
212
- }), /*#__PURE__*/React.createElement(View, {
213
- style: {
214
- ...view_styles.body_row,
215
- margin: 10,
216
- backgroundColor: Colors.shades.white,
217
- borderRadius: 22,
218
- borderWidth: 4,
219
- borderColor: Colors.shades.shade100
220
- }
221
- }, /*#__PURE__*/React.createElement(Button, {
222
- title: "COMPETITIONS",
223
- title_color: active_tab == 'competitions' ? Colors.shades.white : Colors.brand.midnight,
224
- title_weight: active_tab == 'competitions' ? 'bold' : 'regular',
225
- padding: 15,
226
- title_size: 12,
227
- style: {
228
- flex: 1
229
- },
230
- borderRadiusOverride: {
231
- borderTopLeftRadius: 22,
232
- borderBottomLeftRadius: 22,
233
- borderTopRightRadius: 0,
234
- borderBottomRightRadius: 0
235
- },
236
- backgroundColor: active_tab == 'competitions' ? Colors.brand.midnight : Colors.shades.white,
237
- onPress: () => setActiveTab('competitions')
238
- }), /*#__PURE__*/React.createElement(Button, {
239
- title: "SQUARES",
240
- title_size: 12,
241
- title_color: active_tab == 'squares' ? Colors.shades.white : Colors.brand.midnight,
242
- title_weight: active_tab == 'squares' ? 'bold' : 'regular',
243
- padding: 15,
244
- style: {
245
- flex: 1
246
- },
247
- borderRadius: 0,
248
- backgroundColor: active_tab == 'squares' ? Colors.brand.midnight : Colors.shades.white,
249
- onPress: () => setActiveTab('squares')
250
- }), /*#__PURE__*/React.createElement(Button, {
251
- title: "BRACKETS",
252
- style: {
253
- flex: 1
254
- },
255
- title_size: 12,
256
- title_color: active_tab == 'brackets' ? Colors.shades.white : Colors.brand.midnight,
257
- title_weight: active_tab == 'brackets' ? 'bold' : 'regular',
258
- padding: 15,
259
- borderRadiusOverride: {
260
- borderTopLeftRadius: 0,
261
- borderBottomLeftRadius: 0,
262
- borderTopRightRadius: 22,
263
- borderBottomRightRadius: 22
264
- },
265
- backgroundColor: active_tab == 'brackets' ? Colors.brand.midnight : Colors.shades.white,
266
- onPress: () => setActiveTab('brackets')
267
- })), /*#__PURE__*/React.createElement(View, {
268
- style: {
269
- ...view_styles.section_header,
270
- backgroundColor: Colors.shades.shade600,
271
- borderRadius: 0,
272
- marginBottom: 10
273
- }
274
- }, /*#__PURE__*/React.createElement(Icons.EyeOffIcon, {
275
- size: 18,
276
- color: Colors.brand.midnight
277
- }), /*#__PURE__*/React.createElement(View, {
278
- style: {
279
- flex: 1,
280
- marginLeft: 10
281
- }
282
- }, /*#__PURE__*/React.createElement(Text, {
283
- theme: "header"
284
- }, "Find Private"), /*#__PURE__*/React.createElement(Text, {
285
- style: {
286
- marginTop: 3
287
- },
288
- theme: "body"
289
- }, "Did you receive a private code? Enter it here.")), /*#__PURE__*/React.createElement(Button, {
290
- title: "ENTER PRIVATE CODE",
291
- padding: 15,
292
- title_color: Colors.shades.white,
293
- backgroundColor: Colors.utility.success,
294
- onPress: () => setShowCodePrompt(true)
295
- })), active_tab == 'competitions' ? /*#__PURE__*/React.createElement(View, {
296
- style: {
297
- ...view_styles.section_body,
298
- justifyContent: 'flex-start',
299
- padding: 0
300
- }
301
- }, competition_seasons.length > 0 ? /*#__PURE__*/React.createElement(View, {
302
- style: {
303
- marginTop: 10
304
- }
305
- }, /*#__PURE__*/React.createElement(View, {
306
- style: {
307
- ...view_styles.section_header,
308
- backgroundColor: Colors.shades.shade100,
309
- borderRadius: 0,
310
- marginBottom: 10
311
- }
312
- }, /*#__PURE__*/React.createElement(View, {
313
- style: {
314
- flex: 1
315
- }
316
- }, /*#__PURE__*/React.createElement(Text, {
317
- theme: "header"
318
- }, "Public Seasons"), /*#__PURE__*/React.createElement(Text, {
319
- style: {
320
- marginTop: 3
321
- },
322
- theme: "body"
323
- }, "Seasons are multi-competition contests. Payouts are split between each competition and the season long winners.")), onCreateSeason ? /*#__PURE__*/React.createElement(Button, {
324
- title: "NEW",
325
- title_color: Colors.shades.white,
326
- backgroundColor: Colors.utility.success,
327
- onPress: () => onCreateSeason()
328
- }) : /*#__PURE__*/React.createElement(React.Fragment, null)), /*#__PURE__*/React.createElement(FlatList, {
329
- data: competition_seasons.sort((a, b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix()),
330
- horizontal: true,
331
- keyExtractor: item => item.competition_season_id.toString(),
332
- renderItem: renderSeasons
333
- })) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
334
- style: {
335
- marginBottom: 15,
336
- marginTop: 10
337
- }
338
- }, /*#__PURE__*/React.createElement(View, {
339
- style: {
340
- ...view_styles.section_header,
341
- backgroundColor: Colors.shades.shade100,
342
- borderRadius: 0
343
- }
344
- }, /*#__PURE__*/React.createElement(View, {
411
+ }, /*#__PURE__*/React.createElement(FlatList, {
412
+ data: engage_sections,
413
+ key: `engage_sections`,
414
+ keyExtractor: item => item,
415
+ renderItem: renderSections,
416
+ refreshing: loading,
417
+ onRefresh: () => getDataFromServer()
418
+ }), show_code_prompt ? /*#__PURE__*/React.createElement(Modal, {
419
+ transparent: true,
420
+ animationType: "slide",
345
421
  style: {
346
422
  flex: 1
347
423
  }
348
- }, /*#__PURE__*/React.createElement(Text, {
349
- theme: "header"
350
- }, "Public Competitions"), /*#__PURE__*/React.createElement(Text, {
351
- style: {
352
- marginTop: 3
353
- },
354
- theme: "body"
355
- }, "Below are available pick-em and wager based competitions. All competitions are offered with 0 fees. All ticket sales are paid out to the winners!")), onCreateCompetition ? /*#__PURE__*/React.createElement(Button, {
356
- title: "NEW",
357
- title_color: Colors.shades.white,
358
- backgroundColor: Colors.utility.success,
359
- onPress: () => onCreateCompetition()
360
- }) : /*#__PURE__*/React.createElement(React.Fragment, null))), /*#__PURE__*/React.createElement(FlatList, {
361
- data: competitions.sort((a, b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix()),
362
- renderItem: renderCompetitions,
363
- keyExtractor: item => item.competition_id.toString()
364
- })) : active_tab == 'squares' ? /*#__PURE__*/React.createElement(View, {
365
- style: {
366
- ...view_styles.section_body,
367
- padding: 0
368
- }
369
- }, /*#__PURE__*/React.createElement(View, {
370
- style: {
371
- marginBottom: 15,
372
- marginTop: 10
373
- }
374
- }, /*#__PURE__*/React.createElement(View, {
375
- style: {
376
- ...view_styles.section_header,
377
- backgroundColor: Colors.shades.shade100,
378
- borderRadius: 0
379
- }
380
- }, /*#__PURE__*/React.createElement(View, {
424
+ }, /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
381
425
  style: {
382
426
  flex: 1
383
- }
384
- }, /*#__PURE__*/React.createElement(Text, {
385
- theme: "header"
386
- }, "Public Auction Squares"), /*#__PURE__*/React.createElement(Text, {
387
- style: {
388
- marginTop: 3
389
427
  },
390
- theme: "body"
391
- }, "Below are available squares competitions. Bid on squares until the auction period ends. Win $ and prizes when your square hits at the end of each quarter!")), onCreateSquares ? /*#__PURE__*/React.createElement(Button, {
392
- title: "NEW",
393
- title_color: Colors.shades.white,
394
- backgroundColor: Colors.utility.success,
395
- onPress: () => onCreateSquares()
396
- }) : /*#__PURE__*/React.createElement(React.Fragment, null))), /*#__PURE__*/React.createElement(FlatList, {
397
- data: squares_competitions.sort((a, b) => moment(a.begin_datetime).unix() - moment(b.begin_datetime).unix()),
398
- renderItem: renderSquaresCompetitions,
399
- keyExtractor: item => item.sq_comp_id.toString()
400
- })) : active_tab == 'brackets' ? /*#__PURE__*/React.createElement(View, {
401
- style: {
402
- ...view_styles.section_body,
403
- padding: 0
404
- }
428
+ behavior: Platform.OS == 'ios' ? 'padding' : 'height'
405
429
  }, /*#__PURE__*/React.createElement(View, {
430
+ type: "blur",
406
431
  style: {
407
- marginBottom: 15,
408
- marginTop: 10
409
- }
410
- }, /*#__PURE__*/React.createElement(View, {
411
- style: {
412
- ...view_styles.section_header,
413
- backgroundColor: Colors.shades.shade100,
414
- borderRadius: 0
415
- }
416
- }, /*#__PURE__*/React.createElement(View, {
417
- style: {
418
- flex: 1
419
- }
420
- }, /*#__PURE__*/React.createElement(Text, {
421
- theme: "header"
422
- }, "Public Bracket Competitions"), /*#__PURE__*/React.createElement(Text, {
423
- style: {
424
- marginTop: 3
425
- },
426
- theme: "body"
427
- }, "Below are available bracket competitions. All competitions are offered with 0 fees. All ticket sales are paid out to the winners!")), onCreateBracketCompetition ? /*#__PURE__*/React.createElement(Button, {
428
- title: "NEW",
429
- title_color: Colors.shades.white,
430
- backgroundColor: Colors.utility.success,
431
- onPress: () => onCreateBracketCompetition()
432
- }) : /*#__PURE__*/React.createElement(React.Fragment, null))), /*#__PURE__*/React.createElement(FlatList, {
433
- data: bracket_competitions.sort((a, b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix()),
434
- renderItem: renderBracketCompetitions,
435
- keyExtractor: item => item.bracket_competition_id.toString()
436
- })) : /*#__PURE__*/React.createElement(React.Fragment, null)), show_code_prompt ? /*#__PURE__*/React.createElement(View, {
437
- style: {
438
- position: 'absolute',
439
- top: 0,
440
- left: 0,
441
- right: 0,
442
- bottom: 0,
432
+ flex: 1,
443
433
  justifyContent: 'flex-end',
444
- backgroundColor: Colors.shades.black_faded_heavy
434
+ paddingBottom: insets?.bottom
445
435
  }
446
436
  }, /*#__PURE__*/React.createElement(PrivateCodePrompt, {
447
- width: module_size.width - 20,
448
437
  onFoundBracket: b => {
449
438
  onSelectBracketCompetition(b);
450
439
  setShowCodePrompt(false);
@@ -462,6 +451,20 @@ const EngageModule = ({
462
451
  setShowCodePrompt(false);
463
452
  },
464
453
  onClose: () => setShowCodePrompt(false)
454
+ })))) : /*#__PURE__*/React.createElement(React.Fragment, null), loading ? /*#__PURE__*/React.createElement(View, {
455
+ type: "blur",
456
+ style: {
457
+ position: 'absolute',
458
+ top: 0,
459
+ left: 0,
460
+ right: 0,
461
+ bottom: 0,
462
+ alignItems: 'center',
463
+ padding: 20
464
+ }
465
+ }, /*#__PURE__*/React.createElement(ActivityIndicator, {
466
+ size: "large",
467
+ color: Colors.text.h1
465
468
  })) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(SocketManager, {
466
469
  onConnect: () => setSocketState({
467
470
  ...socket_state,