be-components 4.4.0 → 4.4.2

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 (332) hide show
  1. package/lib/commonjs/Bracket/api/index.js +95 -3
  2. package/lib/commonjs/Bracket/api/index.js.map +1 -1
  3. package/lib/commonjs/Bracket/components/BracketCompetitionActions.js +534 -0
  4. package/lib/commonjs/Bracket/components/BracketCompetitionActions.js.map +1 -0
  5. package/lib/commonjs/Bracket/components/BracketCompetitionCard.js +4 -2
  6. package/lib/commonjs/Bracket/components/BracketCompetitionCard.js.map +1 -1
  7. package/lib/commonjs/Bracket/components/BracketCompetitionSelector.js +50 -25
  8. package/lib/commonjs/Bracket/components/BracketCompetitionSelector.js.map +1 -1
  9. package/lib/commonjs/Bracket/components/BracketHeader.js +63 -0
  10. package/lib/commonjs/Bracket/components/BracketHeader.js.map +1 -0
  11. package/lib/commonjs/Bracket/components/BracketPlay/BracketRound.js +4 -0
  12. package/lib/commonjs/Bracket/components/BracketPlay/BracketRound.js.map +1 -1
  13. package/lib/commonjs/Bracket/components/BracketPlay/RoundEvent.js +42 -21
  14. package/lib/commonjs/Bracket/components/BracketPlay/RoundEvent.js.map +1 -1
  15. package/lib/commonjs/Bracket/components/BracketPlay/index.js +76 -84
  16. package/lib/commonjs/Bracket/components/BracketPlay/index.js.map +1 -1
  17. package/lib/commonjs/Bracket/components/BracketSelector.js +12 -44
  18. package/lib/commonjs/Bracket/components/BracketSelector.js.map +1 -1
  19. package/lib/commonjs/Bracket/components/CompetitionLeaderboard.js +14 -22
  20. package/lib/commonjs/Bracket/components/CompetitionLeaderboard.js.map +1 -1
  21. package/lib/commonjs/Bracket/components/EditPlayerBracket.js +120 -0
  22. package/lib/commonjs/Bracket/components/EditPlayerBracket.js.map +1 -0
  23. package/lib/commonjs/Bracket/components/JoinCompetitionCard.js +61 -50
  24. package/lib/commonjs/Bracket/components/JoinCompetitionCard.js.map +1 -1
  25. package/lib/commonjs/Bracket/components/Navigator.js +102 -0
  26. package/lib/commonjs/Bracket/components/Navigator.js.map +1 -0
  27. package/lib/commonjs/Bracket/components/PlayerBalanceCard.js +16 -13
  28. package/lib/commonjs/Bracket/components/PlayerBalanceCard.js.map +1 -1
  29. package/lib/commonjs/Bracket/components/PlayerBracketCard.js +139 -0
  30. package/lib/commonjs/Bracket/components/PlayerBracketCard.js.map +1 -0
  31. package/lib/commonjs/Bracket/components/PlayerBrackets.js +65 -30
  32. package/lib/commonjs/Bracket/components/PlayerBrackets.js.map +1 -1
  33. package/lib/commonjs/Bracket/components/RoomHome.js +837 -0
  34. package/lib/commonjs/Bracket/components/RoomHome.js.map +1 -0
  35. package/lib/commonjs/Bracket/index.js +858 -281
  36. package/lib/commonjs/Bracket/index.js.map +1 -1
  37. package/lib/commonjs/CompetitionManager/components/AthleteSelector.js +1 -4
  38. package/lib/commonjs/CompetitionManager/components/AthleteSelector.js.map +1 -1
  39. package/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.js.map +1 -1
  40. package/lib/commonjs/CompetitionManager/components/CompetitionHeader.js +1 -4
  41. package/lib/commonjs/CompetitionManager/components/CompetitionHeader.js.map +1 -1
  42. package/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.js +8 -3
  43. package/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.js.map +1 -1
  44. package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js +9 -3
  45. package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
  46. package/lib/commonjs/CompetitionManager/components/ContestSelector.js +3 -5
  47. package/lib/commonjs/CompetitionManager/components/ContestSelector.js.map +1 -1
  48. package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js +9 -3
  49. package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js.map +1 -1
  50. package/lib/commonjs/CompetitionManager/components/MarketSelector.js +1 -4
  51. package/lib/commonjs/CompetitionManager/components/MarketSelector.js.map +1 -1
  52. package/lib/commonjs/CompetitionManager/components/PlayerSelector.js +1 -4
  53. package/lib/commonjs/CompetitionManager/components/PlayerSelector.js.map +1 -1
  54. package/lib/commonjs/CompetitionManager/index.js +286 -164
  55. package/lib/commonjs/CompetitionManager/index.js.map +1 -1
  56. package/lib/commonjs/Components/Icons.js +51 -0
  57. package/lib/commonjs/Components/Icons.js.map +1 -1
  58. package/lib/commonjs/Components/SearchBox.js +2 -0
  59. package/lib/commonjs/Components/SearchBox.js.map +1 -1
  60. package/lib/commonjs/Engage/components/BracketCompetitionCard.js +2 -0
  61. package/lib/commonjs/Engage/components/BracketCompetitionCard.js.map +1 -1
  62. package/lib/module/Bracket/api/index.js +95 -3
  63. package/lib/module/Bracket/api/index.js.map +1 -1
  64. package/lib/module/Bracket/components/BracketCompetitionActions.js +525 -0
  65. package/lib/module/Bracket/components/BracketCompetitionActions.js.map +1 -0
  66. package/lib/module/Bracket/components/BracketCompetitionCard.js +4 -2
  67. package/lib/module/Bracket/components/BracketCompetitionCard.js.map +1 -1
  68. package/lib/module/Bracket/components/BracketCompetitionSelector.js +51 -26
  69. package/lib/module/Bracket/components/BracketCompetitionSelector.js.map +1 -1
  70. package/lib/module/Bracket/components/BracketHeader.js +56 -0
  71. package/lib/module/Bracket/components/BracketHeader.js.map +1 -0
  72. package/lib/module/Bracket/components/BracketPlay/BracketRound.js +4 -0
  73. package/lib/module/Bracket/components/BracketPlay/BracketRound.js.map +1 -1
  74. package/lib/module/Bracket/components/BracketPlay/RoundEvent.js +42 -21
  75. package/lib/module/Bracket/components/BracketPlay/RoundEvent.js.map +1 -1
  76. package/lib/module/Bracket/components/BracketPlay/index.js +77 -84
  77. package/lib/module/Bracket/components/BracketPlay/index.js.map +1 -1
  78. package/lib/module/Bracket/components/BracketSelector.js +11 -45
  79. package/lib/module/Bracket/components/BracketSelector.js.map +1 -1
  80. package/lib/module/Bracket/components/CompetitionLeaderboard.js +15 -23
  81. package/lib/module/Bracket/components/CompetitionLeaderboard.js.map +1 -1
  82. package/lib/module/Bracket/components/EditPlayerBracket.js +112 -0
  83. package/lib/module/Bracket/components/EditPlayerBracket.js.map +1 -0
  84. package/lib/module/Bracket/components/JoinCompetitionCard.js +54 -43
  85. package/lib/module/Bracket/components/JoinCompetitionCard.js.map +1 -1
  86. package/lib/module/Bracket/components/Navigator.js +95 -0
  87. package/lib/module/Bracket/components/Navigator.js.map +1 -0
  88. package/lib/module/Bracket/components/PlayerBalanceCard.js +13 -10
  89. package/lib/module/Bracket/components/PlayerBalanceCard.js.map +1 -1
  90. package/lib/module/Bracket/components/PlayerBracketCard.js +133 -0
  91. package/lib/module/Bracket/components/PlayerBracketCard.js.map +1 -0
  92. package/lib/module/Bracket/components/PlayerBrackets.js +64 -31
  93. package/lib/module/Bracket/components/PlayerBrackets.js.map +1 -1
  94. package/lib/module/Bracket/components/RoomHome.js +828 -0
  95. package/lib/module/Bracket/components/RoomHome.js.map +1 -0
  96. package/lib/module/Bracket/index.js +865 -283
  97. package/lib/module/Bracket/index.js.map +1 -1
  98. package/lib/module/CompetitionManager/components/AthleteSelector.js +1 -4
  99. package/lib/module/CompetitionManager/components/AthleteSelector.js.map +1 -1
  100. package/lib/module/CompetitionManager/components/CompetitionContestsForm.js.map +1 -1
  101. package/lib/module/CompetitionManager/components/CompetitionHeader.js +1 -4
  102. package/lib/module/CompetitionManager/components/CompetitionHeader.js.map +1 -1
  103. package/lib/module/CompetitionManager/components/CompetitionInfoForm.js +8 -3
  104. package/lib/module/CompetitionManager/components/CompetitionInfoForm.js.map +1 -1
  105. package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js +9 -3
  106. package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
  107. package/lib/module/CompetitionManager/components/ContestSelector.js +3 -5
  108. package/lib/module/CompetitionManager/components/ContestSelector.js.map +1 -1
  109. package/lib/module/CompetitionManager/components/ContestSettingsForm.js +9 -3
  110. package/lib/module/CompetitionManager/components/ContestSettingsForm.js.map +1 -1
  111. package/lib/module/CompetitionManager/components/MarketSelector.js +1 -4
  112. package/lib/module/CompetitionManager/components/MarketSelector.js.map +1 -1
  113. package/lib/module/CompetitionManager/components/PlayerSelector.js +1 -4
  114. package/lib/module/CompetitionManager/components/PlayerSelector.js.map +1 -1
  115. package/lib/module/CompetitionManager/index.js +288 -165
  116. package/lib/module/CompetitionManager/index.js.map +1 -1
  117. package/lib/module/Components/Icons.js +51 -0
  118. package/lib/module/Components/Icons.js.map +1 -1
  119. package/lib/module/Components/SearchBox.js +2 -0
  120. package/lib/module/Components/SearchBox.js.map +1 -1
  121. package/lib/module/Engage/components/BracketCompetitionCard.js +2 -0
  122. package/lib/module/Engage/components/BracketCompetitionCard.js.map +1 -1
  123. package/lib/typescript/lib/commonjs/Bracket/api/index.d.ts +11 -1
  124. package/lib/typescript/lib/commonjs/Bracket/api/index.d.ts.map +1 -1
  125. package/lib/typescript/lib/commonjs/Bracket/components/BracketCompetitionActions.d.ts +24 -0
  126. package/lib/typescript/lib/commonjs/Bracket/components/BracketCompetitionActions.d.ts.map +1 -0
  127. package/lib/typescript/lib/commonjs/Bracket/components/BracketCompetitionCard.d.ts.map +1 -1
  128. package/lib/typescript/lib/commonjs/Bracket/components/BracketCompetitionSelector.d.ts +2 -2
  129. package/lib/typescript/lib/commonjs/Bracket/components/BracketCompetitionSelector.d.ts.map +1 -1
  130. package/lib/typescript/lib/commonjs/Bracket/components/BracketHeader.d.ts +7 -0
  131. package/lib/typescript/lib/commonjs/Bracket/components/BracketHeader.d.ts.map +1 -0
  132. package/lib/typescript/lib/commonjs/Bracket/components/BracketPlay/BracketRound.d.ts.map +1 -1
  133. package/lib/typescript/lib/commonjs/Bracket/components/BracketPlay/RoundEvent.d.ts.map +1 -1
  134. package/lib/typescript/lib/commonjs/Bracket/components/BracketPlay/index.d.ts +3 -4
  135. package/lib/typescript/lib/commonjs/Bracket/components/BracketPlay/index.d.ts.map +1 -1
  136. package/lib/typescript/lib/commonjs/Bracket/components/BracketSelector.d.ts +1 -3
  137. package/lib/typescript/lib/commonjs/Bracket/components/BracketSelector.d.ts.map +1 -1
  138. package/lib/typescript/lib/commonjs/Bracket/components/CompetitionLeaderboard.d.ts +3 -3
  139. package/lib/typescript/lib/commonjs/Bracket/components/CompetitionLeaderboard.d.ts.map +1 -1
  140. package/lib/typescript/lib/commonjs/Bracket/components/EditPlayerBracket.d.ts +8 -0
  141. package/lib/typescript/lib/commonjs/Bracket/components/EditPlayerBracket.d.ts.map +1 -0
  142. package/lib/typescript/lib/commonjs/Bracket/components/JoinCompetitionCard.d.ts.map +1 -1
  143. package/lib/typescript/lib/commonjs/Bracket/components/Navigator.d.ts +9 -0
  144. package/lib/typescript/lib/commonjs/Bracket/components/Navigator.d.ts.map +1 -0
  145. package/lib/typescript/lib/commonjs/Bracket/components/PlayerBalanceCard.d.ts.map +1 -1
  146. package/lib/typescript/lib/commonjs/Bracket/components/PlayerBracketCard.d.ts +4 -0
  147. package/lib/typescript/lib/commonjs/Bracket/components/PlayerBracketCard.d.ts.map +1 -0
  148. package/lib/typescript/lib/commonjs/Bracket/components/PlayerBrackets.d.ts +3 -2
  149. package/lib/typescript/lib/commonjs/Bracket/components/PlayerBrackets.d.ts.map +1 -1
  150. package/lib/typescript/lib/commonjs/Bracket/components/RoomHome.d.ts +21 -0
  151. package/lib/typescript/lib/commonjs/Bracket/components/RoomHome.d.ts.map +1 -0
  152. package/lib/typescript/lib/commonjs/Bracket/index.d.ts +5 -3
  153. package/lib/typescript/lib/commonjs/Bracket/index.d.ts.map +1 -1
  154. package/lib/typescript/lib/commonjs/CompetitionManager/components/AthleteSelector.d.ts +1 -3
  155. package/lib/typescript/lib/commonjs/CompetitionManager/components/AthleteSelector.d.ts.map +1 -1
  156. package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionHeader.d.ts +1 -2
  157. package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionHeader.d.ts.map +1 -1
  158. package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.d.ts +3 -1
  159. package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.d.ts.map +1 -1
  160. package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.d.ts +3 -1
  161. package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
  162. package/lib/typescript/lib/commonjs/CompetitionManager/components/ContestSelector.d.ts +1 -3
  163. package/lib/typescript/lib/commonjs/CompetitionManager/components/ContestSelector.d.ts.map +1 -1
  164. package/lib/typescript/lib/commonjs/CompetitionManager/components/ContestSettingsForm.d.ts +3 -1
  165. package/lib/typescript/lib/commonjs/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
  166. package/lib/typescript/lib/commonjs/CompetitionManager/components/MarketSelector.d.ts +1 -3
  167. package/lib/typescript/lib/commonjs/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
  168. package/lib/typescript/lib/commonjs/CompetitionManager/components/PlayerSelector.d.ts +1 -3
  169. package/lib/typescript/lib/commonjs/CompetitionManager/components/PlayerSelector.d.ts.map +1 -1
  170. package/lib/typescript/lib/commonjs/CompetitionManager/index.d.ts +2 -1
  171. package/lib/typescript/lib/commonjs/CompetitionManager/index.d.ts.map +1 -1
  172. package/lib/typescript/lib/commonjs/Components/Icons.d.ts +10 -0
  173. package/lib/typescript/lib/commonjs/Components/Icons.d.ts.map +1 -1
  174. package/lib/typescript/lib/commonjs/Components/SearchBox.d.ts +2 -1
  175. package/lib/typescript/lib/commonjs/Components/SearchBox.d.ts.map +1 -1
  176. package/lib/typescript/lib/commonjs/Engage/components/BracketCompetitionCard.d.ts.map +1 -1
  177. package/lib/typescript/lib/module/Bracket/api/index.d.ts +11 -1
  178. package/lib/typescript/lib/module/Bracket/api/index.d.ts.map +1 -1
  179. package/lib/typescript/lib/module/Bracket/components/BracketCompetitionActions.d.ts +24 -0
  180. package/lib/typescript/lib/module/Bracket/components/BracketCompetitionActions.d.ts.map +1 -0
  181. package/lib/typescript/lib/module/Bracket/components/BracketCompetitionCard.d.ts.map +1 -1
  182. package/lib/typescript/lib/module/Bracket/components/BracketCompetitionSelector.d.ts +2 -2
  183. package/lib/typescript/lib/module/Bracket/components/BracketCompetitionSelector.d.ts.map +1 -1
  184. package/lib/typescript/lib/module/Bracket/components/BracketHeader.d.ts +7 -0
  185. package/lib/typescript/lib/module/Bracket/components/BracketHeader.d.ts.map +1 -0
  186. package/lib/typescript/lib/module/Bracket/components/BracketPlay/BracketRound.d.ts.map +1 -1
  187. package/lib/typescript/lib/module/Bracket/components/BracketPlay/RoundEvent.d.ts.map +1 -1
  188. package/lib/typescript/lib/module/Bracket/components/BracketPlay/index.d.ts +4 -7
  189. package/lib/typescript/lib/module/Bracket/components/BracketPlay/index.d.ts.map +1 -1
  190. package/lib/typescript/lib/module/Bracket/components/BracketSelector.d.ts +2 -6
  191. package/lib/typescript/lib/module/Bracket/components/BracketSelector.d.ts.map +1 -1
  192. package/lib/typescript/lib/module/Bracket/components/CompetitionLeaderboard.d.ts +3 -3
  193. package/lib/typescript/lib/module/Bracket/components/CompetitionLeaderboard.d.ts.map +1 -1
  194. package/lib/typescript/lib/module/Bracket/components/EditPlayerBracket.d.ts +10 -0
  195. package/lib/typescript/lib/module/Bracket/components/EditPlayerBracket.d.ts.map +1 -0
  196. package/lib/typescript/lib/module/Bracket/components/JoinCompetitionCard.d.ts +1 -2
  197. package/lib/typescript/lib/module/Bracket/components/JoinCompetitionCard.d.ts.map +1 -1
  198. package/lib/typescript/lib/module/Bracket/components/Navigator.d.ts +11 -0
  199. package/lib/typescript/lib/module/Bracket/components/Navigator.d.ts.map +1 -0
  200. package/lib/typescript/lib/module/Bracket/components/PlayerBalanceCard.d.ts +1 -2
  201. package/lib/typescript/lib/module/Bracket/components/PlayerBalanceCard.d.ts.map +1 -1
  202. package/lib/typescript/lib/module/Bracket/components/PlayerBracketCard.d.ts +10 -0
  203. package/lib/typescript/lib/module/Bracket/components/PlayerBracketCard.d.ts.map +1 -0
  204. package/lib/typescript/lib/module/Bracket/components/PlayerBrackets.d.ts +4 -5
  205. package/lib/typescript/lib/module/Bracket/components/PlayerBrackets.d.ts.map +1 -1
  206. package/lib/typescript/lib/module/Bracket/components/RoomHome.d.ts +23 -0
  207. package/lib/typescript/lib/module/Bracket/components/RoomHome.d.ts.map +1 -0
  208. package/lib/typescript/lib/module/Bracket/index.d.ts +6 -4
  209. package/lib/typescript/lib/module/Bracket/index.d.ts.map +1 -1
  210. package/lib/typescript/lib/module/CompetitionManager/components/AthleteSelector.d.ts +1 -3
  211. package/lib/typescript/lib/module/CompetitionManager/components/AthleteSelector.d.ts.map +1 -1
  212. package/lib/typescript/lib/module/CompetitionManager/components/CompetitionHeader.d.ts +1 -2
  213. package/lib/typescript/lib/module/CompetitionManager/components/CompetitionHeader.d.ts.map +1 -1
  214. package/lib/typescript/lib/module/CompetitionManager/components/CompetitionInfoForm.d.ts +3 -1
  215. package/lib/typescript/lib/module/CompetitionManager/components/CompetitionInfoForm.d.ts.map +1 -1
  216. package/lib/typescript/lib/module/CompetitionManager/components/CompetitionSettingsForm.d.ts +3 -1
  217. package/lib/typescript/lib/module/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
  218. package/lib/typescript/lib/module/CompetitionManager/components/ContestSelector.d.ts +1 -3
  219. package/lib/typescript/lib/module/CompetitionManager/components/ContestSelector.d.ts.map +1 -1
  220. package/lib/typescript/lib/module/CompetitionManager/components/ContestSettingsForm.d.ts +3 -1
  221. package/lib/typescript/lib/module/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
  222. package/lib/typescript/lib/module/CompetitionManager/components/MarketSelector.d.ts +1 -3
  223. package/lib/typescript/lib/module/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
  224. package/lib/typescript/lib/module/CompetitionManager/components/PlayerSelector.d.ts +1 -3
  225. package/lib/typescript/lib/module/CompetitionManager/components/PlayerSelector.d.ts.map +1 -1
  226. package/lib/typescript/lib/module/CompetitionManager/index.d.ts +2 -1
  227. package/lib/typescript/lib/module/CompetitionManager/index.d.ts.map +1 -1
  228. package/lib/typescript/lib/module/Components/Icons.d.ts +10 -0
  229. package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
  230. package/lib/typescript/lib/module/Components/SearchBox.d.ts +2 -1
  231. package/lib/typescript/lib/module/Components/SearchBox.d.ts.map +1 -1
  232. package/lib/typescript/lib/module/Engage/components/BracketCompetitionCard.d.ts.map +1 -1
  233. package/lib/typescript/src/Bracket/api/index.d.ts +22 -3
  234. package/lib/typescript/src/Bracket/api/index.d.ts.map +1 -1
  235. package/lib/typescript/src/Bracket/components/BracketCompetitionActions.d.ts +37 -0
  236. package/lib/typescript/src/Bracket/components/BracketCompetitionActions.d.ts.map +1 -0
  237. package/lib/typescript/src/Bracket/components/BracketCompetitionCard.d.ts.map +1 -1
  238. package/lib/typescript/src/Bracket/components/BracketCompetitionSelector.d.ts +8 -2
  239. package/lib/typescript/src/Bracket/components/BracketCompetitionSelector.d.ts.map +1 -1
  240. package/lib/typescript/src/Bracket/components/BracketHeader.d.ts +15 -0
  241. package/lib/typescript/src/Bracket/components/BracketHeader.d.ts.map +1 -0
  242. package/lib/typescript/src/Bracket/components/BracketPlay/BracketRound.d.ts +0 -4
  243. package/lib/typescript/src/Bracket/components/BracketPlay/BracketRound.d.ts.map +1 -1
  244. package/lib/typescript/src/Bracket/components/BracketPlay/index.d.ts +3 -7
  245. package/lib/typescript/src/Bracket/components/BracketPlay/index.d.ts.map +1 -1
  246. package/lib/typescript/src/Bracket/components/BracketSelector.d.ts +1 -3
  247. package/lib/typescript/src/Bracket/components/BracketSelector.d.ts.map +1 -1
  248. package/lib/typescript/src/Bracket/components/CompetitionLeaderboard.d.ts +4 -2
  249. package/lib/typescript/src/Bracket/components/CompetitionLeaderboard.d.ts.map +1 -1
  250. package/lib/typescript/src/Bracket/components/EditPlayerBracket.d.ts +10 -0
  251. package/lib/typescript/src/Bracket/components/EditPlayerBracket.d.ts.map +1 -0
  252. package/lib/typescript/src/Bracket/components/JoinCompetitionCard.d.ts +2 -2
  253. package/lib/typescript/src/Bracket/components/JoinCompetitionCard.d.ts.map +1 -1
  254. package/lib/typescript/src/Bracket/components/Navigator.d.ts +16 -0
  255. package/lib/typescript/src/Bracket/components/Navigator.d.ts.map +1 -0
  256. package/lib/typescript/src/Bracket/components/PlayerBalanceCard.d.ts.map +1 -1
  257. package/lib/typescript/src/Bracket/components/PlayerBracketCard.d.ts +16 -0
  258. package/lib/typescript/src/Bracket/components/PlayerBracketCard.d.ts.map +1 -0
  259. package/lib/typescript/src/Bracket/components/PlayerBrackets.d.ts +4 -2
  260. package/lib/typescript/src/Bracket/components/PlayerBrackets.d.ts.map +1 -1
  261. package/lib/typescript/src/Bracket/components/RoomHome.d.ts +30 -0
  262. package/lib/typescript/src/Bracket/components/RoomHome.d.ts.map +1 -0
  263. package/lib/typescript/src/Bracket/index.d.ts +17 -3
  264. package/lib/typescript/src/Bracket/index.d.ts.map +1 -1
  265. package/lib/typescript/src/CompetitionManager/components/AthleteSelector.d.ts +1 -3
  266. package/lib/typescript/src/CompetitionManager/components/AthleteSelector.d.ts.map +1 -1
  267. package/lib/typescript/src/CompetitionManager/components/CompetitionContestsForm.d.ts +0 -1
  268. package/lib/typescript/src/CompetitionManager/components/CompetitionContestsForm.d.ts.map +1 -1
  269. package/lib/typescript/src/CompetitionManager/components/CompetitionHeader.d.ts +1 -2
  270. package/lib/typescript/src/CompetitionManager/components/CompetitionHeader.d.ts.map +1 -1
  271. package/lib/typescript/src/CompetitionManager/components/CompetitionInfoForm.d.ts +4 -3
  272. package/lib/typescript/src/CompetitionManager/components/CompetitionInfoForm.d.ts.map +1 -1
  273. package/lib/typescript/src/CompetitionManager/components/CompetitionSettingsForm.d.ts +4 -3
  274. package/lib/typescript/src/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
  275. package/lib/typescript/src/CompetitionManager/components/ContestSelector.d.ts +1 -3
  276. package/lib/typescript/src/CompetitionManager/components/ContestSelector.d.ts.map +1 -1
  277. package/lib/typescript/src/CompetitionManager/components/ContestSettingsForm.d.ts +4 -3
  278. package/lib/typescript/src/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
  279. package/lib/typescript/src/CompetitionManager/components/MarketSelector.d.ts +1 -3
  280. package/lib/typescript/src/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
  281. package/lib/typescript/src/CompetitionManager/components/PlayerSelector.d.ts +1 -3
  282. package/lib/typescript/src/CompetitionManager/components/PlayerSelector.d.ts.map +1 -1
  283. package/lib/typescript/src/CompetitionManager/index.d.ts +3 -1
  284. package/lib/typescript/src/CompetitionManager/index.d.ts.map +1 -1
  285. package/lib/typescript/src/Components/Icons.d.ts +2 -0
  286. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  287. package/lib/typescript/src/Components/SearchBox.d.ts +7 -1
  288. package/lib/typescript/src/Components/SearchBox.d.ts.map +1 -1
  289. package/package.json +1 -1
  290. package/src/Bracket/api/index.ts +83 -5
  291. package/src/Bracket/components/BracketCompetitionActions.tsx +360 -0
  292. package/src/Bracket/components/BracketCompetitionCard.tsx +4 -2
  293. package/src/Bracket/components/BracketCompetitionSelector.tsx +35 -15
  294. package/src/Bracket/components/BracketHeader.tsx +41 -0
  295. package/src/Bracket/components/BracketPlay/BracketRound.tsx +4 -5
  296. package/src/Bracket/components/BracketPlay/RoundEvent.tsx +21 -21
  297. package/src/Bracket/components/BracketPlay/index.tsx +57 -52
  298. package/src/Bracket/components/BracketSelector.tsx +16 -21
  299. package/src/Bracket/components/CompetitionLeaderboard.tsx +19 -22
  300. package/src/Bracket/components/EditPlayerBracket.tsx +81 -0
  301. package/src/Bracket/components/JoinCompetitionCard.tsx +46 -33
  302. package/src/Bracket/components/Navigator.tsx +57 -0
  303. package/src/Bracket/components/PlayerBalanceCard.tsx +9 -10
  304. package/src/Bracket/components/PlayerBracketCard.tsx +105 -0
  305. package/src/Bracket/components/PlayerBrackets.tsx +46 -18
  306. package/src/Bracket/components/RoomHome.tsx +543 -0
  307. package/src/Bracket/index.tsx +659 -127
  308. package/src/CompetitionManager/components/AthleteSelector.tsx +2 -4
  309. package/src/CompetitionManager/components/CompetitionContestsForm.tsx +0 -1
  310. package/src/CompetitionManager/components/CompetitionHeader.tsx +2 -3
  311. package/src/CompetitionManager/components/CompetitionInfoForm.tsx +12 -6
  312. package/src/CompetitionManager/components/CompetitionSettingsForm.tsx +13 -6
  313. package/src/CompetitionManager/components/ContestSelector.tsx +3 -5
  314. package/src/CompetitionManager/components/ContestSettingsForm.tsx +15 -8
  315. package/src/CompetitionManager/components/MarketSelector.tsx +2 -4
  316. package/src/CompetitionManager/components/PlayerSelector.tsx +2 -4
  317. package/src/CompetitionManager/index.tsx +176 -96
  318. package/src/Components/Icons.tsx +30 -0
  319. package/src/Components/SearchBox.tsx +3 -1
  320. package/src/Engage/components/BracketCompetitionCard.tsx +2 -2
  321. package/src/types.d.ts +1 -0
  322. package/lib/commonjs/Bracket/components/RoomMenu.js +0 -120
  323. package/lib/commonjs/Bracket/components/RoomMenu.js.map +0 -1
  324. package/lib/module/Bracket/components/RoomMenu.js +0 -113
  325. package/lib/module/Bracket/components/RoomMenu.js.map +0 -1
  326. package/lib/typescript/lib/commonjs/Bracket/components/RoomMenu.d.ts +0 -8
  327. package/lib/typescript/lib/commonjs/Bracket/components/RoomMenu.d.ts.map +0 -1
  328. package/lib/typescript/lib/module/Bracket/components/RoomMenu.d.ts +0 -10
  329. package/lib/typescript/lib/module/Bracket/components/RoomMenu.d.ts.map +0 -1
  330. package/lib/typescript/src/Bracket/components/RoomMenu.d.ts +0 -14
  331. package/lib/typescript/src/Bracket/components/RoomMenu.d.ts.map +0 -1
  332. package/src/Bracket/components/RoomMenu.tsx +0 -69
@@ -17,7 +17,6 @@ type BracketRoundSectionProps = {
17
17
  orientation:'left'|'right',
18
18
  active_bracket_group_id?:string,
19
19
  onPick: (player_bracket_pick:PlayerBracketPickProps) => void,
20
- bracket_size: { width:number, height:number },
21
20
  left_bar?:boolean,
22
21
  right_bar?:boolean
23
22
  }
@@ -38,8 +37,8 @@ const BracketRoundSection = ({ bracket_round, round_event_loading, teams, round_
38
37
  const away_team = teams.find(t => t.team_id == data.item.away_side_id);
39
38
  const loading = round_event_loading == data.item.round_event_id ? true : false
40
39
  return (
41
- <View style={{ margin:2, flex:1, flexGrow:1, justifyContent:'center' }}>
42
- <View style={{ margin:1, ...view_styles.float }}>
40
+ <View transparent style={{ margin:2, flex:1, flexGrow:1, justifyContent:'center' }}>
41
+ <View transparent style={{ margin:1, ...view_styles.float }}>
43
42
  <RoundEventCard
44
43
  round_event={data.item}
45
44
  loading={loading}
@@ -65,9 +64,9 @@ const BracketRoundSection = ({ bracket_round, round_event_loading, teams, round_
65
64
 
66
65
 
67
66
  return (
68
- <View style={{ }}>
67
+ <View transparent style={{ }}>
69
68
  {!hide_titles ?
70
- <View style={{ padding:10 }}>
69
+ <View transparent style={{ padding:10 }}>
71
70
  <Text size={14} theme='h1' textAlign="center">{bracket_round.round_name}</Text>
72
71
  </View>
73
72
  :<></>}
@@ -142,14 +142,14 @@ const RoundEventCard = ({ event, loading, away_team, away_placeholder_team, home
142
142
  switch(side){
143
143
  case 'away':
144
144
  return (
145
- <View style={{ }}>
145
+ <View transparent>
146
146
  {round_event?.away_side_id && away_placeholder_pick && away_placeholder_team ?
147
- <View style={{ padding:4, borderTopRightRadius:4, borderTopLeftRadius:4 }}>
148
- <Text size={10} weight='semibold' color={away_placeholder_pick.result_ind=='win'?Colors.text.success:Colors.text.error}>{away_placeholder_team.market_name} {away_placeholder_team.name}</Text>
147
+ <View transparent style={{ padding:7, borderTopRightRadius:8, borderTopLeftRadius:8, borderBottomWidth:1, borderBottomColor:Colors.borders.light }}>
148
+ <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>
149
149
  </View>
150
150
  :<></>}
151
- <View style={{ flexDirection:'row', alignItems:'center', padding:8 }}>
152
- <View style={{ flex:1, marginRight:10, marginLeft:0 }}>
151
+ <View style={{ flexDirection:'row', alignItems:'center', padding:8, borderTopRightRadius:!away_placeholder_pick?8:0, borderTopLeftRadius:!away_placeholder_pick?8:0 }}>
152
+ <View transparent style={{ flex:1, marginRight:10, marginLeft:0 }}>
153
153
  {round_event.away_side_id && away_team ?
154
154
  <View style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
155
155
  <Image
@@ -158,12 +158,12 @@ const RoundEventCard = ({ event, loading, away_team, away_placeholder_team, home
158
158
  resizeMode="cover"
159
159
  />
160
160
  <Text style={{ paddingRight: 5, borderRightWidth:1, borderColor:Colors.borders.light }} size={10} theme='description'>{round_event.away_seed}</Text>
161
- <Text style={{ flex:1 }} size={10} color={getPickColor('away', player_bracket_pick)} weight={'semibold'}>{away_team.market_name} {away_team.name}</Text>
161
+ <Text style={{ flex:1 }} size={10} color={getPickColor('away', player_bracket_pick)} theme='h2'>{away_team.market_name} {away_team.name}</Text>
162
162
  </View>
163
163
  :
164
- <View>
164
+ <View transparent>
165
165
  {away_placeholder_pick && away_placeholder_team ?
166
- <View style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
166
+ <View transparent style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
167
167
  <Image
168
168
  source={{ uri: away_placeholder_team.image?.url }}
169
169
  style={{ height:20, width:20, marginRight:2 }}
@@ -178,7 +178,7 @@ const RoundEventCard = ({ event, loading, away_team, away_placeholder_team, home
178
178
  </View>
179
179
  }
180
180
  </View>
181
- <View style={{ flexDirection:'row', alignItems:'center', borderLeftWidth:1, borderLeftColor:Colors.borders.light }}>
181
+ <View transparent style={{ flexDirection:'row', alignItems:'center', borderLeftWidth:1, borderLeftColor:Colors.borders.light }}>
182
182
  {round_event.event_id ?
183
183
  <Text style={{ margin:5}} size={10} theme='h2'>{getScore(away_team?.team_id)}</Text>
184
184
  :<></>}
@@ -189,22 +189,22 @@ const RoundEventCard = ({ event, loading, away_team, away_placeholder_team, home
189
189
  )
190
190
  case 'home':
191
191
  return (
192
- <View style={{ }}>
193
- <View style={{ flexDirection:'row', alignItems:'center', padding:8}}>
192
+ <View transparent>
193
+ <View style={{ flexDirection:'row', alignItems:'center', padding:8, borderBottomRightRadius:!home_placeholder_pick?8:0, borderBottomLeftRadius:!home_placeholder_pick?8:0 }}>
194
194
 
195
- <View style={{ flex:1, marginRight:10 }}>
195
+ <View transparent style={{ flex:1, marginRight:10 }}>
196
196
  {round_event.home_side_id && home_team ?
197
- <View style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
197
+ <View transparent style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
198
198
  <Image
199
199
  source={{ uri: home_team.image?.url }}
200
200
  style={{ height:20, width:20, marginRight:2 }}
201
201
  resizeMode="cover"
202
202
  />
203
203
  <Text style={{ paddingRight: 5, borderRightWidth:1, borderColor:Colors.borders.light }} size={10} theme='description'>{round_event.home_seed}</Text>
204
- <Text style={{ flex:1 }} size={10} color={getPickColor('home', player_bracket_pick)} weight={'semibold'}>{home_team.market_name} {home_team.name}</Text>
204
+ <Text style={{ flex:1 }} size={10} color={getPickColor('home', player_bracket_pick)} theme='h2'>{home_team.market_name} {home_team.name}</Text>
205
205
  </View>
206
206
  :
207
- <View>
207
+ <View transparent>
208
208
  {home_placeholder_pick && home_placeholder_team ?
209
209
  <View style={{ flexGrow:1, flexDirection:'row', alignItems:'center' }}>
210
210
  <Image
@@ -221,7 +221,7 @@ const RoundEventCard = ({ event, loading, away_team, away_placeholder_team, home
221
221
  </View>
222
222
  }
223
223
  </View>
224
- <View style={{ flexDirection:'row', alignItems:'center', borderLeftWidth:1, borderLeftColor:Colors.borders.light }}>
224
+ <View transparent style={{ flexDirection:'row', alignItems:'center', borderLeftWidth:1, borderLeftColor:Colors.borders.light }}>
225
225
  {round_event.event_id ?
226
226
  <Text style={{ margin:5}} size={10} theme='h2'>{getScore(home_team?.team_id)}</Text>
227
227
  :<></>}
@@ -229,8 +229,8 @@ const RoundEventCard = ({ event, loading, away_team, away_placeholder_team, home
229
229
  </View>
230
230
  </View>
231
231
  {round_event?.home_side_id && home_placeholder_pick && home_placeholder_team?
232
- <View style={{ padding:4, borderBottomRightRadius:4, borderBottomLeftRadius:4 }}>
233
- <Text size={10} weight='semibold' color={home_placeholder_pick.result_ind=='win'?Colors.text.success:Colors.text.error}>{home_placeholder_team.market_name} {home_placeholder_team.name}</Text>
232
+ <View transparent style={{ padding:7, borderBottomRightRadius:4, borderBottomLeftRadius:4, borderTopWidth:1, borderTopColor:Colors.borders.light }}>
233
+ <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>
234
234
  </View>
235
235
  :<></>}
236
236
  </View>
@@ -240,11 +240,11 @@ const RoundEventCard = ({ event, loading, away_team, away_placeholder_team, home
240
240
 
241
241
 
242
242
  return (
243
- <View float style={{ minWidth:125, width:round_width, backgroundColor:no_pick?'blue':'black', borderRadius:4 }}>
244
- <Button style={{ borderBottomWidth:1, borderColor:Colors.borders.light, padding:5 }} onPress={() => handleSelectAway()}>
243
+ <View float type='header' style={{ minWidth:125, width:round_width }}>
244
+ <Button transparent style={{ padding:0, borderBottomWidth:1, borderColor:Colors.borders.light}} onPress={() => handleSelectAway()}>
245
245
  {renderSide('away')}
246
246
  </Button>
247
- <Button style={{ padding:5 }} onPress={() => handleSelectHome()}>
247
+ <Button transparent style={{ padding:0 }} onPress={() => handleSelectHome()}>
248
248
  {renderSide('home')}
249
249
  </Button>
250
250
  {loading ?
@@ -4,27 +4,23 @@ import type { AthleteProps, BracketGroupProps, BracketProps, BracketRoundProps,
4
4
  import { BracketApi, BracketComeptitionApi, BracketCompetitionHelpers } from '../../api';
5
5
  import { Icons } from '../../../Components';
6
6
  import BracketRoundSection from './BracketRound';
7
- import BracketNavigator from './BracketNavigator';
8
7
  import { Button, Text, View } from '../../../Components/Themed';
9
8
  import { useColors } from '../../../constants/useColors';
10
9
 
11
10
  type BracketPlayProps = {
12
- visible: boolean,
13
11
  player?:MyPlayerProps
14
- room_size:{ width:number, height:number },
15
12
  player_bracket_id?:string,
16
13
  bracket_id?:string,
14
+ width:number,
15
+ onEditPlayerBracket: (pb:PlayerBracketProps) => void,
17
16
  onRequestAuthenticate: () => void,
18
17
  onChangePlayerBracket: (bracket_id:string) => void,
19
- onClose: () => void
20
18
  onPlayerBracketUpdate: (pb:PlayerBracketProps, cpbs:CompetitionPlayerBracketProps[]) => void,
21
19
  }
22
- const MIN_ROUND_WIDTH = 175
23
- const MAX_ROUND_WIDTH = 200;
24
- const BracketPlay = ({ visible, player, room_size, bracket_id, player_bracket_id, onClose, onPlayerBracketUpdate, onChangePlayerBracket, onRequestAuthenticate }:BracketPlayProps) => {
20
+
21
+ const BracketPlay = ({ player, width, bracket_id, player_bracket_id, onEditPlayerBracket, onPlayerBracketUpdate, onChangePlayerBracket, onRequestAuthenticate }:BracketPlayProps) => {
25
22
  const Colors = useColors();
26
23
  const [ round_event_loading, setRoundEventLoading ] = useState<string|undefined>(undefined);
27
- const [ show_filter, setShowFilter ] = useState(false);
28
24
  const [ play_data, setPlayData ] = useState<{
29
25
  play_loading:boolean,
30
26
  player_bracket?:PlayerBracketProps,
@@ -54,7 +50,7 @@ const BracketPlay = ({ visible, player, room_size, bracket_id, player_bracket_id
54
50
  events: []
55
51
  })
56
52
  const { play_loading, player_bracket, player_bracket_picks } = play_data;
57
- const { loading, bracket_groups, bracket_rounds, round_events, bracket, teams, athletes, selected_group, selected_round } = bracket_data;
53
+ const { loading, bracket_rounds, round_events, bracket, teams, athletes, selected_round } = bracket_data;
58
54
 
59
55
  const champion_team = player_bracket?.champion_id_type == 'team' ? teams.find(t => t.team_id == player_bracket?.champion_id) : undefined
60
56
  const champion_athlete = player_bracket?.champion_id_type == 'athlete' ? athletes.find(a => a.athlete_id == player_bracket?.champion_id) : undefined
@@ -65,15 +61,18 @@ const BracketPlay = ({ visible, player, room_size, bracket_id, player_bracket_id
65
61
  visible_rounds = bracket_rounds.filter((_, i) => i == next_round || i == next_round + 1)
66
62
  }
67
63
 
68
- let round_width = (room_size.width / 2) - 15
69
- if(round_width < MIN_ROUND_WIDTH){ round_width = MIN_ROUND_WIDTH }
70
- if(round_width > MAX_ROUND_WIDTH){ round_width = MAX_ROUND_WIDTH }
71
- useEffect(() => {
72
- if(!bracket_id || !visible){ return }
64
+ let round_width = BracketCompetitionHelpers.calcRoundWidth(width, bracket_rounds.length, 4)
65
+
66
+ useEffect(() => {
67
+ if(!bracket_id){ return }
73
68
  getData(bracket_id)
74
- },[visible, bracket_id])
69
+ },[bracket_id])
75
70
 
76
71
  useEffect(() => {
72
+ if(!player_bracket_id && !player_bracket){ return }
73
+ if(!player_bracket_id && player_bracket){
74
+ return setPlayData({ ...play_data, player_bracket: undefined, player_bracket_picks: [] })
75
+ }
77
76
  if(!player_bracket_id){ return }
78
77
  getPlayData(player_bracket_id);
79
78
  },[player_bracket_id])
@@ -124,7 +123,6 @@ const BracketPlay = ({ visible, player, room_size, bracket_id, player_bracket_id
124
123
  const b = await BracketApi.getBracketById(id);
125
124
  let team_ids:string[] = []
126
125
  let athlete_ids:string[] = []
127
-
128
126
  b.round_events.map(re => {
129
127
  if(re.away_side_type == 'team' && re.away_side_id){ team_ids.push(re.away_side_id) }
130
128
  if(re.home_side_type == 'team' && re.home_side_id){ team_ids.push(re.home_side_id) }
@@ -133,7 +131,6 @@ const BracketPlay = ({ visible, player, room_size, bracket_id, player_bracket_id
133
131
  })
134
132
  let ts = await BracketApi.getTeamsByIds(team_ids);
135
133
  let aths = await BracketApi.getAthletesByIds(athlete_ids);
136
-
137
134
  setData({
138
135
  ...bracket_data,
139
136
  bracket: b.bracket,
@@ -158,15 +155,11 @@ const BracketPlay = ({ visible, player, room_size, bracket_id, player_bracket_id
158
155
  width={round_width}
159
156
  orientation='right'
160
157
  onPick={(pick) => handlePick(pick)}
161
- bracket_size={room_size}
162
158
 
163
159
  />
164
160
  )
165
161
  }
166
162
 
167
-
168
- if(!visible){ return <></> }
169
-
170
163
  if(!bracket || loading || play_loading){
171
164
  return (
172
165
  <View type='blur'>
@@ -175,35 +168,7 @@ const BracketPlay = ({ visible, player, room_size, bracket_id, player_bracket_id
175
168
  )
176
169
  }
177
170
  return (
178
- <View style={{ flexGrow:1 }}>
179
- <View style={{ zIndex:10, flexDirection:'row', alignItems:'center', padding:20, borderBottomWidth:1, borderColor:Colors.borders.light }}>
180
- <Button style={{ flex:1, flexDirection:'row', alignItems: 'center' }} onPress={() => onClose()}>
181
- <Icons.ChevronIcon direction='left' size={12} color={Colors.text.h1} />
182
- <View style={{ flex:1, marginLeft:20, marginRight:10 }}>
183
- <Text size={18} theme='h1'>{bracket.bracket_name}</Text>
184
- </View>
185
- </Button>
186
- <View style={{ zIndex:10 }}>
187
- <Button
188
- title='Filter'
189
- type='info'
190
- onPress={() => setShowFilter(true)}
191
- />
192
- {show_filter ?
193
- <View style={{ position:'absolute', top:5, right:5, borderRadius:8 }}>
194
- <BracketNavigator
195
- bracket_groups={bracket_groups}
196
- bracket_rounds={bracket_rounds}
197
- selected_group={selected_group}
198
- selected_round={selected_round}
199
- onSelectGroup={(g) => setData({ ...bracket_data, selected_group: selected_group?.bracket_group_id == g.bracket_group_id ? undefined : g })}
200
- onSelectRound={(r) => setData({ ...bracket_data, selected_round: selected_round?.bracket_round_id == r.bracket_round_id ? undefined : r })}
201
- onClose={() => setShowFilter(false)}
202
- />
203
- </View>
204
- :<></>}
205
- </View>
206
- </View>
171
+ <View transparent style={{ flex:1 }}>
207
172
  {player_bracket ?
208
173
  <View float style={{ padding:10, borderRadius:0, flexDirection:'row', alignItems:'center' }}>
209
174
  {champion_team ?
@@ -229,13 +194,31 @@ const BracketPlay = ({ visible, player, room_size, bracket_id, player_bracket_id
229
194
  <Text size={14} theme='h1'>{player_bracket.bracket_name}</Text>
230
195
  <Text style={{ marginTop:3 }} size={12} theme='description'>{(player_bracket.completion_pct*100).toFixed(2)}% Complete</Text>
231
196
  </View>
197
+ <Button transparent onPress={() => onEditPlayerBracket(player_bracket)}>
198
+ <Icons.EditIcon size={14} color={Colors.text.action} />
199
+ </Button>
232
200
  <Button
233
201
  title='Change'
202
+ style={{ padding:10 }}
234
203
  type='info'
235
204
  onPress={() => onChangePlayerBracket(bracket.bracket_id)}
236
205
  />
237
206
  </View>
238
- :<></>}
207
+ :
208
+ <View style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
209
+ <View transparent style={{ flex:1 }}>
210
+ <Text size={14} theme='h1'>No Bracket Selected</Text>
211
+ <Text style={{ marginTop:3 }} size={12} theme='description'>{0.00}% Complete</Text>
212
+ </View>
213
+ <Button
214
+ style={{ padding:10 }}
215
+ title='Select Bracket'
216
+ onPress={() => onChangePlayerBracket(bracket.bracket_id)}
217
+ type='success'
218
+ />
219
+ </View>
220
+ }
221
+
239
222
 
240
223
  <ScrollView>
241
224
  <ScrollView horizontal style={{ flexDirection:'row', padding:10 }}>
@@ -248,4 +231,26 @@ const BracketPlay = ({ visible, player, room_size, bracket_id, player_bracket_id
248
231
  )
249
232
  }
250
233
 
251
- export default BracketPlay
234
+ export default BracketPlay
235
+
236
+
237
+ /*
238
+ <Button
239
+ title='Filter'
240
+ type='info'
241
+ onPress={() => setShowFilter(true)}
242
+ />
243
+ {show_filter ?
244
+ <View style={{ position:'absolute', top:5, right:5, borderRadius:8 }}>
245
+ <BracketNavigator
246
+ bracket_groups={bracket_groups}
247
+ bracket_rounds={bracket_rounds}
248
+ selected_group={selected_group}
249
+ selected_round={selected_round}
250
+ onSelectGroup={(g) => setData({ ...bracket_data, selected_group: selected_group?.bracket_group_id == g.bracket_group_id ? undefined : g })}
251
+ onSelectRound={(r) => setData({ ...bracket_data, selected_round: selected_round?.bracket_round_id == r.bracket_round_id ? undefined : r })}
252
+ onClose={() => setShowFilter(false)}
253
+ />
254
+ </View>
255
+ :<></>}
256
+ */
@@ -1,22 +1,22 @@
1
- import React from 'react';
2
- import { FlatList, Image, ScrollView } from "react-native"
1
+ import React, { useState } from 'react';
2
+ import { FlatList, Image } from "react-native"
3
3
  import type { BracketProps, LeagueProps } from '../../types';
4
- import { Icons } from '../../Components';
5
4
  import moment from 'moment-mini';
6
5
  import { Button, Text, View } from '../../Components/Themed';
7
6
  import { useColors } from '../../constants/useColors';
7
+ import SearchBox from '../../Components/SearchBox';
8
8
 
9
9
  type BracketSelectorProps = {
10
- visible: boolean,
11
10
  brackets: BracketProps[],
12
11
  leagues:LeagueProps[],
13
12
  onSelectBracket:(bracket:BracketProps) => void,
14
- onClose:() => void
15
13
  }
16
14
 
17
- const BracketSelector = ({ visible, leagues, brackets, onSelectBracket, onClose }:BracketSelectorProps) => {
15
+ const BracketSelector = ({ leagues, brackets, onSelectBracket }:BracketSelectorProps) => {
18
16
  const Colors = useColors();
19
- const unique_league_ids = [ ...new Set(brackets.map(b => b.league_id)) ]
17
+ const [ active_search, setActiveSearch ] = useState('');
18
+ let visible_brackets = brackets.filter(b => `${b.bracket_name.toLowerCase()}`.includes(active_search.toLowerCase()))
19
+ const unique_league_ids = [ ...new Set(visible_brackets.map(b => b.league_id)) ]
20
20
 
21
21
 
22
22
  const renderBrackets = (data: { item:BracketProps, index:number }) => {
@@ -65,23 +65,18 @@ const BracketSelector = ({ visible, leagues, brackets, onSelectBracket, onClose
65
65
  )
66
66
  }
67
67
 
68
- if(!visible){ return <></> }
69
68
  return (
70
69
  <View style={{ flex:1 }}>
71
- <Button style={{ flexDirection:'row', alignItems:'center', padding:20, borderBottomWidth:1, borderColor:Colors.borders.light }} onPress={() => onClose()}>
72
- <Icons.ChevronIcon direction='left' size={12} color={Colors.text.h1} />
73
- <View style={{ flex:1, marginLeft:20 }}>
74
- <Text size={18} theme='h1' weight='bold'>Active Brackets</Text>
75
- <Text style={{ marginTop:4 }} size={14} theme='light' weight='regular'>Select a bracket below to make or edit picks</Text>
76
- </View>
77
- </Button>
78
- <ScrollView style={{ flex:1 }}>
79
- <FlatList
80
- data={unique_league_ids}
81
- renderItem={renderLeagues}
82
- keyExtractor={(item) => item.toString()}
70
+ <View>
71
+ <SearchBox
72
+ onChange={(text) => setActiveSearch(text)}
83
73
  />
84
- </ScrollView>
74
+ </View>
75
+ <FlatList
76
+ data={unique_league_ids}
77
+ renderItem={renderLeagues}
78
+ keyExtractor={(item) => item.toString()}
79
+ />
85
80
  </View>
86
81
  )
87
82
  }
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { FlatList, Image, ScrollView, ActivityIndicator } from 'react-native';
2
+ import { FlatList, Image, ActivityIndicator } from 'react-native';
3
3
  import type { AthleteProps, CompetitionPlayerBracketProps, PlayerBracketProps, PublicPlayerProps, TeamProps } from '../../types';
4
4
  import { BracketApi, BracketComeptitionApi } from '../api';
5
5
  import { CompetitionHelpers } from '../../Competition/api';
@@ -10,13 +10,15 @@ type CompetitionLeaderboardProps = {
10
10
  bracket_competition_id:string,
11
11
  my_competition_player_brackets:CompetitionPlayerBracketProps[],
12
12
  my_player_brackets:PlayerBracketProps[],
13
- view_mode: 'short'|'full',
13
+ view_mode: 'mobile'|'desktop',
14
+ can_enter?:boolean,
14
15
  show_champions?:boolean,
16
+ onEnterCompetition:() => void,
15
17
  onViewFull?: () => void,
16
18
  onClose?:() => void
17
19
  }
18
20
 
19
- const CompetitionLeaderboard = ({ bracket_competition_id, my_competition_player_brackets, my_player_brackets, view_mode, show_champions, onViewFull, onClose }:CompetitionLeaderboardProps) => {
21
+ const CompetitionLeaderboard = ({ bracket_competition_id, onEnterCompetition, can_enter, my_competition_player_brackets, my_player_brackets, show_champions, onClose }:CompetitionLeaderboardProps) => {
20
22
  const Colors = useColors();
21
23
  const [ leaders_data, setData ] = useState<{
22
24
  loading:boolean,
@@ -36,9 +38,7 @@ const CompetitionLeaderboard = ({ bracket_competition_id, my_competition_player_
36
38
  players:[]
37
39
  })
38
40
  const { loading, offset, competition_player_brackets, players, player_brackets, teams, athletes } = leaders_data;
39
-
40
41
  let visible_leaders = competition_player_brackets.sort((a,b) => a.place - b.place);
41
- if(view_mode == 'short'){ visible_leaders = competition_player_brackets.slice(0, 3) }
42
42
 
43
43
  useEffect(() => {
44
44
  if(!bracket_competition_id){ return }
@@ -114,21 +114,28 @@ const CompetitionLeaderboard = ({ bracket_competition_id, my_competition_player_
114
114
  }
115
115
 
116
116
  return (
117
- <View style={{ flex:1 }}>
118
- <ScrollView style={{ flex:1 }}>
119
- {my_competition_player_brackets.length > 0 ?
120
- <View style={{ padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
117
+ <View transparent style={{ flex:1 }}>
118
+
119
+ <View type='header' style={{ padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
121
120
  <View transparent style={{ marginBottom:5 }}>
122
- <Text size={14} color={Colors.text.h1}>MY RESULTS</Text>
121
+ <Text size={14} theme='h1'>MY RESULTS</Text>
123
122
  </View>
123
+ {my_competition_player_brackets.length > 0 ?
124
124
  <FlatList
125
125
  data={my_competition_player_brackets}
126
126
  renderItem={renderLeaders}
127
127
  keyExtractor={(item) => item.competition_player_bracket_id.toString()}
128
128
  />
129
- </View>
129
+ : can_enter ?
130
+ <Button
131
+ title='ENTER COMPETITION'
132
+ type='success'
133
+ onPress={() => onEnterCompetition()}
134
+ />
130
135
  :<></>}
131
- <View style={{ padding:10, borderRadius:8 }}>
136
+
137
+ </View>
138
+ <View style={{ flex:1, padding:10, borderRadius:8 }}>
132
139
  <View style={{ marginBottom:5 }}>
133
140
  <Text size={14} theme='h2'>RESULTS</Text>
134
141
  </View>
@@ -141,16 +148,6 @@ const CompetitionLeaderboard = ({ bracket_competition_id, my_competition_player_
141
148
  keyExtractor={(item) => item.competition_player_bracket_id.toString()}
142
149
  />}
143
150
  </View>
144
- {view_mode == 'short' && onViewFull ?
145
- <View style={{ padding:10 }}>
146
- <Button
147
- title='View Full Leaderboard'
148
- type='text'
149
- onPress={() => onViewFull()}
150
- />
151
- </View>
152
- :<></>}
153
- </ScrollView>
154
151
  {onClose ?
155
152
  <View>
156
153
  <View style={{ padding:10, flexDirection:'row', alignItems:'center', justifyContent:'space-between' }}>
@@ -0,0 +1,81 @@
1
+ import React, { useState } from 'react';
2
+ import { Button, Text, TextInput, View } from "../../Components/Themed"
3
+ import type { PlayerBracketProps } from "../../types"
4
+ import { BracketComeptitionApi } from '../api';
5
+
6
+ type EditPlayerBracketProps = {
7
+ player_bracket?:PlayerBracketProps,
8
+ onUpdatePlayerBracket:(pb:PlayerBracketProps) => void,
9
+ onClose:() => void
10
+ }
11
+ const EditPlayerBracket = ({ player_bracket, onUpdatePlayerBracket, onClose }:EditPlayerBracketProps) => {
12
+ const [ draft_pb, setDraftPb ] = useState(player_bracket);
13
+ const [ action_loading, setActionLoading ] = useState(false);
14
+
15
+ const is_changed = JSON.stringify(draft_pb) != JSON.stringify(player_bracket) ? true : false
16
+
17
+ const handleUpdate = async() => {
18
+ if(action_loading || !draft_pb){ return }
19
+ setActionLoading(true);
20
+ let new_pb = await BracketComeptitionApi.updatePlayerBracket(draft_pb)
21
+ setActionLoading(false);
22
+ onUpdatePlayerBracket(new_pb)
23
+ }
24
+
25
+ const handleDelete = async() => {
26
+ if(action_loading || !draft_pb){ return }
27
+ setActionLoading(true);
28
+ let new_pb = await BracketComeptitionApi.deletePlayerBracket(draft_pb.player_bracket_id);
29
+ console.log(new_pb)
30
+ setActionLoading(false);
31
+ onUpdatePlayerBracket(new_pb)
32
+ }
33
+
34
+ if(!player_bracket || !draft_pb){ return <></> }
35
+
36
+ return (
37
+ <View transparent>
38
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
39
+ <View transparent style={{ flex:1 }}>
40
+ <Text theme='h1'>EDIT MY BRACKET</Text>
41
+ <Text style={{ marginTop:3 }} theme='description'>{player_bracket.bracket_name}</Text>
42
+ </View>
43
+ <Button
44
+ title='DELETE'
45
+ type='error'
46
+ loading={action_loading}
47
+ style={{ padding:10, opacity:action_loading?0.5:1 }}
48
+ disabled={action_loading}
49
+ onPress={() => handleDelete()}
50
+ />
51
+ </View>
52
+ <View type='body' style={{ padding:10 }}>
53
+ <View>
54
+ <Text style={{ marginBottom:10 }} theme='h2'>Update Bracket Name</Text>
55
+ <TextInput
56
+ value={draft_pb?.bracket_name}
57
+ onChangeText={(text) => setDraftPb({ ...draft_pb, bracket_name: text })}
58
+ />
59
+ </View>
60
+ </View>
61
+ <View type='footer' style={{ flexDirection:'row', padding:10, borderBottomLeftRadius:8, borderBottomRightRadius:8 }}>
62
+ <Button
63
+ style={{ flex:1 }}
64
+ title='CANCEL'
65
+ type='close'
66
+ onPress={() => onClose()}
67
+ />
68
+ <Button
69
+ style={{ flex:2, marginLeft:5, opacity: is_changed?1:0.5 }}
70
+ title='UPDATE'
71
+ loading={action_loading}
72
+ type='success'
73
+ disabled={!is_changed || action_loading}
74
+ onPress={handleUpdate}
75
+ />
76
+ </View>
77
+ </View>
78
+ )
79
+ }
80
+
81
+ export default EditPlayerBracket