be-components 5.0.8 → 5.0.9

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 (237) hide show
  1. package/lib/commonjs/Bracket/components/BracketPlay/index.js +9 -2
  2. package/lib/commonjs/Bracket/components/BracketPlay/index.js.map +1 -1
  3. package/lib/commonjs/Bracket/index.js +10 -0
  4. package/lib/commonjs/Bracket/index.js.map +1 -1
  5. package/lib/commonjs/Campaign/api/index.js +105 -0
  6. package/lib/commonjs/Campaign/api/index.js.map +1 -0
  7. package/lib/commonjs/Campaign/components/ActionList.js +96 -0
  8. package/lib/commonjs/Campaign/components/ActionList.js.map +1 -0
  9. package/lib/commonjs/Campaign/components/AnalyticsCard.js +42 -0
  10. package/lib/commonjs/Campaign/components/AnalyticsCard.js.map +1 -0
  11. package/lib/commonjs/Campaign/components/AutoManager.js +101 -0
  12. package/lib/commonjs/Campaign/components/AutoManager.js.map +1 -0
  13. package/lib/commonjs/Campaign/components/BetAlert.js +176 -0
  14. package/lib/commonjs/Campaign/components/BetAlert.js.map +1 -0
  15. package/lib/commonjs/Campaign/components/CampaignAnalytics.js +51 -0
  16. package/lib/commonjs/Campaign/components/CampaignAnalytics.js.map +1 -0
  17. package/lib/commonjs/Campaign/components/ParticipantCard.js +135 -0
  18. package/lib/commonjs/Campaign/components/ParticipantCard.js.map +1 -0
  19. package/lib/commonjs/Campaign/components/ParticipantsList.js +117 -0
  20. package/lib/commonjs/Campaign/components/ParticipantsList.js.map +1 -0
  21. package/lib/commonjs/Campaign/components/ProgressTimer.js +50 -0
  22. package/lib/commonjs/Campaign/components/ProgressTimer.js.map +1 -0
  23. package/lib/commonjs/Campaign/index.js +440 -0
  24. package/lib/commonjs/Campaign/index.js.map +1 -0
  25. package/lib/commonjs/Components/ConfirmationModal.js +32 -3
  26. package/lib/commonjs/Components/ConfirmationModal.js.map +1 -1
  27. package/lib/commonjs/Components/Icons.js +49 -0
  28. package/lib/commonjs/Components/Icons.js.map +1 -1
  29. package/lib/commonjs/Components/ProgressBar.js +94 -0
  30. package/lib/commonjs/Components/ProgressBar.js.map +1 -0
  31. package/lib/commonjs/Components/index.js +7 -0
  32. package/lib/commonjs/Components/index.js.map +1 -1
  33. package/lib/commonjs/MarketComponents/api/index.js +17 -0
  34. package/lib/commonjs/MarketComponents/api/index.js.map +1 -1
  35. package/lib/commonjs/SocialComponents/api/index.js +3 -0
  36. package/lib/commonjs/SocialComponents/api/index.js.map +1 -1
  37. package/lib/commonjs/Ticker/components/TradeText.js +82 -0
  38. package/lib/commonjs/Ticker/components/TradeText.js.map +1 -0
  39. package/lib/commonjs/Ticker/index.js +254 -0
  40. package/lib/commonjs/Ticker/index.js.map +1 -0
  41. package/lib/commonjs/constants/useColors.js +2 -2
  42. package/lib/commonjs/constants/useColors.js.map +1 -1
  43. package/lib/commonjs/index.js +14 -0
  44. package/lib/commonjs/index.js.map +1 -1
  45. package/lib/module/Bracket/components/BracketPlay/index.js +9 -2
  46. package/lib/module/Bracket/components/BracketPlay/index.js.map +1 -1
  47. package/lib/module/Bracket/index.js +10 -0
  48. package/lib/module/Bracket/index.js.map +1 -1
  49. package/lib/module/Campaign/api/index.js +99 -0
  50. package/lib/module/Campaign/api/index.js.map +1 -0
  51. package/lib/module/Campaign/components/ActionList.js +89 -0
  52. package/lib/module/Campaign/components/ActionList.js.map +1 -0
  53. package/lib/module/Campaign/components/AnalyticsCard.js +35 -0
  54. package/lib/module/Campaign/components/AnalyticsCard.js.map +1 -0
  55. package/lib/module/Campaign/components/AutoManager.js +92 -0
  56. package/lib/module/Campaign/components/AutoManager.js.map +1 -0
  57. package/lib/module/Campaign/components/BetAlert.js +169 -0
  58. package/lib/module/Campaign/components/BetAlert.js.map +1 -0
  59. package/lib/module/Campaign/components/CampaignAnalytics.js +42 -0
  60. package/lib/module/Campaign/components/CampaignAnalytics.js.map +1 -0
  61. package/lib/module/Campaign/components/ParticipantCard.js +128 -0
  62. package/lib/module/Campaign/components/ParticipantCard.js.map +1 -0
  63. package/lib/module/Campaign/components/ParticipantsList.js +108 -0
  64. package/lib/module/Campaign/components/ParticipantsList.js.map +1 -0
  65. package/lib/module/Campaign/components/ProgressTimer.js +43 -0
  66. package/lib/module/Campaign/components/ProgressTimer.js.map +1 -0
  67. package/lib/module/Campaign/index.js +431 -0
  68. package/lib/module/Campaign/index.js.map +1 -0
  69. package/lib/module/Components/ConfirmationModal.js +31 -4
  70. package/lib/module/Components/ConfirmationModal.js.map +1 -1
  71. package/lib/module/Components/Icons.js +49 -0
  72. package/lib/module/Components/Icons.js.map +1 -1
  73. package/lib/module/Components/ProgressBar.js +86 -0
  74. package/lib/module/Components/ProgressBar.js.map +1 -0
  75. package/lib/module/Components/index.js +2 -1
  76. package/lib/module/Components/index.js.map +1 -1
  77. package/lib/module/MarketComponents/api/index.js +17 -0
  78. package/lib/module/MarketComponents/api/index.js.map +1 -1
  79. package/lib/module/SocialComponents/api/index.js +2 -0
  80. package/lib/module/SocialComponents/api/index.js.map +1 -1
  81. package/lib/module/Ticker/components/TradeText.js +74 -0
  82. package/lib/module/Ticker/components/TradeText.js.map +1 -0
  83. package/lib/module/Ticker/index.js +245 -0
  84. package/lib/module/Ticker/index.js.map +1 -0
  85. package/lib/module/constants/useColors.js +2 -2
  86. package/lib/module/constants/useColors.js.map +1 -1
  87. package/lib/module/index.js +3 -1
  88. package/lib/module/index.js.map +1 -1
  89. package/lib/typescript/lib/commonjs/Bracket/components/BracketPlay/index.d.ts.map +1 -1
  90. package/lib/typescript/lib/commonjs/Bracket/index.d.ts +2 -1
  91. package/lib/typescript/lib/commonjs/Bracket/index.d.ts.map +1 -1
  92. package/lib/typescript/lib/commonjs/Campaign/api/index.d.ts +30 -0
  93. package/lib/typescript/lib/commonjs/Campaign/api/index.d.ts.map +1 -0
  94. package/lib/typescript/lib/commonjs/Campaign/components/ActionList.d.ts +8 -0
  95. package/lib/typescript/lib/commonjs/Campaign/components/ActionList.d.ts.map +1 -0
  96. package/lib/typescript/lib/commonjs/Campaign/components/AnalyticsCard.d.ts +9 -0
  97. package/lib/typescript/lib/commonjs/Campaign/components/AnalyticsCard.d.ts.map +1 -0
  98. package/lib/typescript/lib/commonjs/Campaign/components/AutoManager.d.ts +10 -0
  99. package/lib/typescript/lib/commonjs/Campaign/components/AutoManager.d.ts.map +1 -0
  100. package/lib/typescript/lib/commonjs/Campaign/components/BetAlert.d.ts +12 -0
  101. package/lib/typescript/lib/commonjs/Campaign/components/BetAlert.d.ts.map +1 -0
  102. package/lib/typescript/lib/commonjs/Campaign/components/CampaignAnalytics.d.ts +6 -0
  103. package/lib/typescript/lib/commonjs/Campaign/components/CampaignAnalytics.d.ts.map +1 -0
  104. package/lib/typescript/lib/commonjs/Campaign/components/ParticipantCard.d.ts +10 -0
  105. package/lib/typescript/lib/commonjs/Campaign/components/ParticipantCard.d.ts.map +1 -0
  106. package/lib/typescript/lib/commonjs/Campaign/components/ParticipantsList.d.ts +11 -0
  107. package/lib/typescript/lib/commonjs/Campaign/components/ParticipantsList.d.ts.map +1 -0
  108. package/lib/typescript/lib/commonjs/Campaign/components/ProgressTimer.d.ts +8 -0
  109. package/lib/typescript/lib/commonjs/Campaign/components/ProgressTimer.d.ts.map +1 -0
  110. package/lib/typescript/lib/commonjs/Campaign/index.d.ts +14 -0
  111. package/lib/typescript/lib/commonjs/Campaign/index.d.ts.map +1 -0
  112. package/lib/typescript/lib/commonjs/Components/ConfirmationModal.d.ts +2 -1
  113. package/lib/typescript/lib/commonjs/Components/ConfirmationModal.d.ts.map +1 -1
  114. package/lib/typescript/lib/commonjs/Components/Icons.d.ts +5 -0
  115. package/lib/typescript/lib/commonjs/Components/Icons.d.ts.map +1 -1
  116. package/lib/typescript/lib/commonjs/Components/ProgressBar.d.ts +15 -0
  117. package/lib/typescript/lib/commonjs/Components/ProgressBar.d.ts.map +1 -0
  118. package/lib/typescript/lib/commonjs/Components/index.d.ts +1 -0
  119. package/lib/typescript/lib/commonjs/MarketComponents/api/index.d.ts +2 -0
  120. package/lib/typescript/lib/commonjs/MarketComponents/api/index.d.ts.map +1 -1
  121. package/lib/typescript/lib/commonjs/SocialComponents/api/index.d.ts.map +1 -1
  122. package/lib/typescript/lib/commonjs/Ticker/components/TradeText.d.ts +9 -0
  123. package/lib/typescript/lib/commonjs/Ticker/components/TradeText.d.ts.map +1 -0
  124. package/lib/typescript/lib/commonjs/Ticker/index.d.ts +9 -0
  125. package/lib/typescript/lib/commonjs/Ticker/index.d.ts.map +1 -0
  126. package/lib/typescript/lib/commonjs/constants/useColors.d.ts +1 -1
  127. package/lib/typescript/lib/commonjs/index.d.ts +2 -0
  128. package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
  129. package/lib/typescript/lib/module/Bracket/components/BracketPlay/index.d.ts.map +1 -1
  130. package/lib/typescript/lib/module/Bracket/index.d.ts +2 -1
  131. package/lib/typescript/lib/module/Bracket/index.d.ts.map +1 -1
  132. package/lib/typescript/lib/module/Campaign/api/index.d.ts +29 -0
  133. package/lib/typescript/lib/module/Campaign/api/index.d.ts.map +1 -0
  134. package/lib/typescript/lib/module/Campaign/components/ActionList.d.ts +8 -0
  135. package/lib/typescript/lib/module/Campaign/components/ActionList.d.ts.map +1 -0
  136. package/lib/typescript/lib/module/Campaign/components/AnalyticsCard.d.ts +9 -0
  137. package/lib/typescript/lib/module/Campaign/components/AnalyticsCard.d.ts.map +1 -0
  138. package/lib/typescript/lib/module/Campaign/components/AutoManager.d.ts +12 -0
  139. package/lib/typescript/lib/module/Campaign/components/AutoManager.d.ts.map +1 -0
  140. package/lib/typescript/lib/module/Campaign/components/BetAlert.d.ts +22 -0
  141. package/lib/typescript/lib/module/Campaign/components/BetAlert.d.ts.map +1 -0
  142. package/lib/typescript/lib/module/Campaign/components/CampaignAnalytics.d.ts +6 -0
  143. package/lib/typescript/lib/module/Campaign/components/CampaignAnalytics.d.ts.map +1 -0
  144. package/lib/typescript/lib/module/Campaign/components/ParticipantCard.d.ts +10 -0
  145. package/lib/typescript/lib/module/Campaign/components/ParticipantCard.d.ts.map +1 -0
  146. package/lib/typescript/lib/module/Campaign/components/ParticipantsList.d.ts +11 -0
  147. package/lib/typescript/lib/module/Campaign/components/ParticipantsList.d.ts.map +1 -0
  148. package/lib/typescript/lib/module/Campaign/components/ProgressTimer.d.ts +10 -0
  149. package/lib/typescript/lib/module/Campaign/components/ProgressTimer.d.ts.map +1 -0
  150. package/lib/typescript/lib/module/Campaign/index.d.ts +14 -0
  151. package/lib/typescript/lib/module/Campaign/index.d.ts.map +1 -0
  152. package/lib/typescript/lib/module/Components/ConfirmationModal.d.ts +2 -1
  153. package/lib/typescript/lib/module/Components/ConfirmationModal.d.ts.map +1 -1
  154. package/lib/typescript/lib/module/Components/Icons.d.ts +5 -0
  155. package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
  156. package/lib/typescript/lib/module/Components/ProgressBar.d.ts +16 -0
  157. package/lib/typescript/lib/module/Components/ProgressBar.d.ts.map +1 -0
  158. package/lib/typescript/lib/module/Components/index.d.ts +2 -1
  159. package/lib/typescript/lib/module/Components/index.d.ts.map +1 -1
  160. package/lib/typescript/lib/module/LocationTracker/api/index.d.ts +2 -2
  161. package/lib/typescript/lib/module/LocationTracker/api/index.d.ts.map +1 -1
  162. package/lib/typescript/lib/module/MarketComponents/api/index.d.ts +2 -0
  163. package/lib/typescript/lib/module/MarketComponents/api/index.d.ts.map +1 -1
  164. package/lib/typescript/lib/module/SocialComponents/api/index.d.ts.map +1 -1
  165. package/lib/typescript/lib/module/Ticker/components/TradeText.d.ts +10 -0
  166. package/lib/typescript/lib/module/Ticker/components/TradeText.d.ts.map +1 -0
  167. package/lib/typescript/lib/module/Ticker/index.d.ts +9 -0
  168. package/lib/typescript/lib/module/Ticker/index.d.ts.map +1 -0
  169. package/lib/typescript/lib/module/constants/useColors.d.ts +1 -1
  170. package/lib/typescript/lib/module/index.d.ts +3 -1
  171. package/lib/typescript/lib/module/index.d.ts.map +1 -1
  172. package/lib/typescript/src/Bracket/components/BracketPlay/index.d.ts.map +1 -1
  173. package/lib/typescript/src/Bracket/index.d.ts +3 -2
  174. package/lib/typescript/src/Bracket/index.d.ts.map +1 -1
  175. package/lib/typescript/src/Campaign/api/index.d.ts +24 -0
  176. package/lib/typescript/src/Campaign/api/index.d.ts.map +1 -0
  177. package/lib/typescript/src/Campaign/components/ActionList.d.ts +10 -0
  178. package/lib/typescript/src/Campaign/components/ActionList.d.ts.map +1 -0
  179. package/lib/typescript/src/Campaign/components/AnalyticsCard.d.ts +10 -0
  180. package/lib/typescript/src/Campaign/components/AnalyticsCard.d.ts.map +1 -0
  181. package/lib/typescript/src/Campaign/components/AutoManager.d.ts +16 -0
  182. package/lib/typescript/src/Campaign/components/AutoManager.d.ts.map +1 -0
  183. package/lib/typescript/src/Campaign/components/BetAlert.d.ts +14 -0
  184. package/lib/typescript/src/Campaign/components/BetAlert.d.ts.map +1 -0
  185. package/lib/typescript/src/Campaign/components/CampaignAnalytics.d.ts +7 -0
  186. package/lib/typescript/src/Campaign/components/CampaignAnalytics.d.ts.map +1 -0
  187. package/lib/typescript/src/Campaign/components/ParticipantCard.d.ts +12 -0
  188. package/lib/typescript/src/Campaign/components/ParticipantCard.d.ts.map +1 -0
  189. package/lib/typescript/src/Campaign/components/ParticipantsList.d.ts +13 -0
  190. package/lib/typescript/src/Campaign/components/ParticipantsList.d.ts.map +1 -0
  191. package/lib/typescript/src/Campaign/components/ProgressTimer.d.ts +10 -0
  192. package/lib/typescript/src/Campaign/components/ProgressTimer.d.ts.map +1 -0
  193. package/lib/typescript/src/Campaign/index.d.ts +24 -0
  194. package/lib/typescript/src/Campaign/index.d.ts.map +1 -0
  195. package/lib/typescript/src/Components/ConfirmationModal.d.ts +2 -1
  196. package/lib/typescript/src/Components/ConfirmationModal.d.ts.map +1 -1
  197. package/lib/typescript/src/Components/Icons.d.ts +1 -0
  198. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  199. package/lib/typescript/src/Components/ProgressBar.d.ts +19 -0
  200. package/lib/typescript/src/Components/ProgressBar.d.ts.map +1 -0
  201. package/lib/typescript/src/Components/index.d.ts +2 -1
  202. package/lib/typescript/src/Components/index.d.ts.map +1 -1
  203. package/lib/typescript/src/MarketComponents/api/index.d.ts +2 -0
  204. package/lib/typescript/src/MarketComponents/api/index.d.ts.map +1 -1
  205. package/lib/typescript/src/SocialComponents/api/index.d.ts.map +1 -1
  206. package/lib/typescript/src/Ticker/components/TradeText.d.ts +11 -0
  207. package/lib/typescript/src/Ticker/components/TradeText.d.ts.map +1 -0
  208. package/lib/typescript/src/Ticker/index.d.ts +11 -0
  209. package/lib/typescript/src/Ticker/index.d.ts.map +1 -0
  210. package/lib/typescript/src/constants/useColors.d.ts +5 -1
  211. package/lib/typescript/src/constants/useColors.d.ts.map +1 -1
  212. package/lib/typescript/src/index.d.ts +3 -1
  213. package/lib/typescript/src/index.d.ts.map +1 -1
  214. package/package.json +2 -1
  215. package/src/Bracket/components/BracketPlay/index.tsx +10 -1
  216. package/src/Bracket/index.tsx +12 -3
  217. package/src/Campaign/api/index.ts +92 -0
  218. package/src/Campaign/components/ActionList.tsx +64 -0
  219. package/src/Campaign/components/AnalyticsCard.tsx +29 -0
  220. package/src/Campaign/components/AutoManager.tsx +88 -0
  221. package/src/Campaign/components/BetAlert.tsx +111 -0
  222. package/src/Campaign/components/CampaignAnalytics.tsx +54 -0
  223. package/src/Campaign/components/ParticipantCard.tsx +78 -0
  224. package/src/Campaign/components/ParticipantsList.tsx +69 -0
  225. package/src/Campaign/components/ProgressTimer.tsx +47 -0
  226. package/src/Campaign/index.tsx +377 -0
  227. package/src/Components/ConfirmationModal.tsx +22 -5
  228. package/src/Components/Icons.tsx +19 -0
  229. package/src/Components/ProgressBar.tsx +54 -0
  230. package/src/Components/index.tsx +2 -1
  231. package/src/MarketComponents/api/index.ts +17 -0
  232. package/src/SocialComponents/api/index.ts +2 -1
  233. package/src/Ticker/components/TradeText.tsx +55 -0
  234. package/src/Ticker/index.tsx +202 -0
  235. package/src/constants/useColors.tsx +5 -3
  236. package/src/index.tsx +5 -0
  237. package/src/types.d.ts +60 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AACpD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,iBAAiB,MAAM,eAAe,CAAC;AAC9C,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,WAAW,MAAM,WAAW,CAAC;AACpC,OAAO,aAAa,MAAM,UAAU,CAAC;AACrC,OAAO,aAAa,MAAM,WAAW,CAAC;AACtC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,qBAAqB,MAAM,uDAAuD,CAAC;AAC1F,OAAO,oBAAoB,MAAM,sDAAsD,CAAC;AACxF,OAAO,YAAY,MAAM,UAAU,CAAC;AACpC,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,gBAAgB,MAAM,wDAAwD,CAAC;AACtF,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,eAAe,MAAM,qCAAqC,CAAC;AAClE,OAAO,sBAAsB,MAAM,4CAA4C,CAAC;AAChF,OAAO,sBAAsB,MAAM,4CAA4C,CAAC;AAChF,OAAO,UAAU,MAAM,gCAAgC,CAAC;AACxD,OAAO,kBAAkB,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,4BAA4B,MAAM,mDAAmD,CAAC;AAC7F,OAAO,EACL,aAAa,EACb,QAAQ,EACR,UAAU,EACV,SAAS,EACT,eAAe,EACf,4BAA4B,EAC5B,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,UAAU,EACX,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AACpD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,iBAAiB,MAAM,eAAe,CAAC;AAC9C,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,WAAW,MAAM,WAAW,CAAC;AACpC,OAAO,aAAa,MAAM,UAAU,CAAC;AACrC,OAAO,aAAa,MAAM,WAAW,CAAC;AACtC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,qBAAqB,MAAM,uDAAuD,CAAC;AAC1F,OAAO,oBAAoB,MAAM,sDAAsD,CAAC;AACxF,OAAO,YAAY,MAAM,UAAU,CAAC;AACpC,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,gBAAgB,MAAM,wDAAwD,CAAC;AACtF,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,eAAe,MAAM,qCAAqC,CAAC;AAClE,OAAO,sBAAsB,MAAM,4CAA4C,CAAC;AAChF,OAAO,sBAAsB,MAAM,4CAA4C,CAAC;AAChF,OAAO,UAAU,MAAM,gCAAgC,CAAC;AACxD,OAAO,kBAAkB,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,4BAA4B,MAAM,mDAAmD,CAAC;AAC7F,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,EACL,aAAa,EACb,QAAQ,EACR,UAAU,EACV,SAAS,EACT,MAAM,EACN,eAAe,EACf,QAAQ,EACR,4BAA4B,EAC5B,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,UAAU,EACX,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "be-components",
3
- "version": "5.0.8",
3
+ "version": "5.0.9",
4
4
  "description": "Components for BettorEdge Apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -201,6 +201,7 @@
201
201
  "react-native-web-linear-gradient": "^1.1.2",
202
202
  "react-native-web-swiper": "^2.2.4",
203
203
  "react-native-webview": "13.12.5",
204
+ "react-qr-code": "^2.0.15",
204
205
  "us-bank-account-validator": "^1.0.0",
205
206
  "uuid": "^9.0.1"
206
207
  },
@@ -317,12 +317,21 @@ const BracketPlay = ({ player, view_mode, width, bracket_id, onSelectContest, pl
317
317
  <Text size={14} theme='h1'>No Bracket Selected</Text>
318
318
  <Text style={{ marginTop:3 }} size={12} theme='description'>{0.00}% Complete</Text>
319
319
  </View>
320
+ {!player ?
321
+ <Button
322
+ style={{ padding:10 }}
323
+ title='Sign In'
324
+ onPress={() => onRequestAuthenticate()}
325
+ type='success'
326
+ />
327
+ :
320
328
  <Button
321
329
  style={{ padding:10 }}
322
330
  title='Select Bracket'
323
331
  onPress={() => onChangePlayerBracket(bracket.bracket_id)}
324
332
  type='success'
325
333
  />
334
+ }
326
335
  </View>
327
336
  }
328
337
 
@@ -345,7 +354,7 @@ const BracketPlay = ({ player, view_mode, width, bracket_id, onSelectContest, pl
345
354
  }
346
355
  }}>
347
356
  <View transparent>
348
- {width > 1000 && !selected_round && !selected_group ?
357
+ {width > 1000 && bracket_rounds.length > 5 && !selected_round && !selected_group ?
349
358
  <View onLayout={(ev) => {
350
359
  const { height, width, x, y } = ev.nativeEvent.layout;
351
360
  setBracketSize({ height, width, x, y })
@@ -23,6 +23,7 @@ type BracketRoomProps = {
23
23
  restrict_competition?:boolean,
24
24
  player_balance?:PlayerBalanceProps,
25
25
  bracket_competition_id?:string,
26
+ onCompleteBracket?:(player:MyPlayerProps, player_bracket:PlayerBracketProps, bracket_competition?:BracketCompetitionProps, cpb?:CompetitionPlayerBracketProps) => void,
26
27
  onManageCompetition:(bracket_competition_id:string) => void,
27
28
  onFocusPosition?:(data:{ x:number, y:number, height:number, width:number }) => void,
28
29
  onShareCompetition:(bracket_competition:BracketCompetitionProps) => void,
@@ -35,7 +36,7 @@ type BracketRoomProps = {
35
36
  const sections = ['header', 'home', 'bracket_selector', 'bracket']
36
37
  const MAX_WIDTH = 2000
37
38
 
38
- const BracketRoom = ({ player_id, hide_home, restrict_competition, width, height, view_mode, bracket_id, insets, onSelectContest, onCreateNewCompetition, onManageCompetition, bracket_competition_id, player_balance, onRequestAuthenticate, onFocusPosition, onShareCompetition }:BracketRoomProps) => {
39
+ const BracketRoom = ({ player_id, hide_home, restrict_competition, width, height, view_mode, bracket_id, insets, onCompleteBracket, onSelectContest, onCreateNewCompetition, onManageCompetition, bracket_competition_id, player_balance, onRequestAuthenticate, onFocusPosition, onShareCompetition }:BracketRoomProps) => {
39
40
  const Colors = useColors();
40
41
  const [ loading, setLoading ] = useState<string|undefined>(undefined);
41
42
  const [ load_pb, setLoadPb ] = useState<PlayerBracketProps|undefined>(undefined);
@@ -267,7 +268,11 @@ const BracketRoom = ({ player_id, hide_home, restrict_competition, width, height
267
268
  ...play_data,
268
269
  player_brackets:player_brackets.filter(pb => pb.player_bracket_id != newpb.player_bracket_id).concat(newpb),
269
270
  competition_player_brackets: competition_player_brackets.filter(cpb => !ncpbs.find(ncpb => ncpb.competition_player_bracket_id == cpb.competition_player_bracket_id)).concat(ncpbs)
270
- })
271
+ });
272
+ if(player && onCompleteBracket && newpb.completion_pct == 1){
273
+ let cpb = ncpbs.find(cpb => cpb.player_bracket_id == newpb.player_bracket_id && cpb.bracket_competition_id == active_competition?.bracket_competition_id);
274
+ onCompleteBracket(player, newpb, active_competition, cpb)
275
+ }
271
276
  }}
272
277
  bracket_id={active_bracket_id}
273
278
  player_bracket_id={active_player_bracket_id}
@@ -439,8 +444,12 @@ const BracketRoom = ({ player_id, hide_home, restrict_competition, width, height
439
444
  ...play_data,
440
445
  player_brackets: new_pb ? player_brackets.concat(new_pb) : player_brackets,
441
446
  competition_player_brackets: competition_player_brackets.concat(new_cpb)
442
-
443
447
  })
448
+ if(onCompleteBracket && player && active_player_bracket && active_player_bracket.completion_pct == 1){
449
+ setTimeout(() => {
450
+ onCompleteBracket(player, active_player_bracket, new_bc, new_cpb);
451
+ }, 400);
452
+ }
444
453
  }}
445
454
  competition_id={active_competition?.bracket_competition_id}
446
455
  onLeaveCompetition={(bc, rem_cpb) => {
@@ -0,0 +1,92 @@
1
+
2
+ import axios from 'axios';
3
+ import type { CampaignParticipantProps, CampaignProps, OrderAnalyticsProps, OrderProps, OverallOrderAnalyticsProps, PublicPlayerProps } from '../../types';
4
+ import { APIOverrides } from '../../ApiOverrides';
5
+ import moment from 'moment-mini';
6
+
7
+ //let SOCIAL_SVC_API = '';
8
+ //let EVENT_SVC_API = '';
9
+ let MK_SVC_API = '';
10
+ let AUTH_SVC_API = '';
11
+
12
+ export const CampaignApi = {
13
+ setEnvironment: () => {
14
+ const endpoints = APIOverrides.getEndpoints();
15
+ //SOCIAL_SVC_API = endpoints['SOCIAL_SVC_API'] as string;
16
+ //EVENT_SVC_API = endpoints['EVENT_SVC_API'] as string;
17
+ MK_SVC_API = endpoints['MK_SVC_API'] as string;
18
+ AUTH_SVC_API = endpoints['AUTH_SVC_API'] as string;
19
+
20
+ },
21
+ getPlayersByPlayerIds : async(player_ids:string[]):Promise<PublicPlayerProps[]> => {
22
+ try {
23
+ if(player_ids.length == 0){ return [] }
24
+ const resp = await axios.post(`${AUTH_SVC_API}/v1/players/bulk/get`, { player_ids })
25
+ return resp.data.players
26
+ } catch (e) {
27
+ return []
28
+ }
29
+ },
30
+ getCampaignById: async(campaign_id:string):Promise<{campaign?:CampaignProps, campaign_participants:CampaignParticipantProps[]}> => {
31
+ try {
32
+ const resp = await axios.get(`${AUTH_SVC_API}/v1/campaigns/campaign/${campaign_id}`);
33
+ return resp.data
34
+ } catch (e) {
35
+ return { campaign: undefined, campaign_participants:[] }
36
+ }
37
+ },
38
+ getCampaignAction: async(campaign_id:string):Promise<OrderProps[]> => {
39
+ try {
40
+ const resp = await axios.get(`${MK_SVC_API}/v1/orders/campaign/action/${campaign_id}`);
41
+ return resp.data.orders
42
+ } catch (e) {
43
+ return []
44
+ }
45
+ },
46
+ getCampaignAnalytics: async(campaign_id:string, to:number, from:number):Promise<OrderAnalyticsProps[]> => {
47
+ try {
48
+ const resp = await axios.get(`${MK_SVC_API}/v1/analytics/campaign/details/${campaign_id}?to=${to}&from=${from}`);
49
+ return resp.data.analytics
50
+ } catch (e) {
51
+ console.log(e);
52
+ return []
53
+ }
54
+ }
55
+ }
56
+
57
+ export const CampaignHelpers = {
58
+ aggregateAnalytics: (analytics:OrderAnalyticsProps[]):OverallOrderAnalyticsProps&{roi_pct:number, win_pct:number, earnings:number} => {
59
+ const wins = analytics.reduce((a,b) => a + b.wins, 0);
60
+ const losses = analytics.reduce((a,b) => a + b.losses, 0);
61
+ const draws = analytics.reduce((a,b) => a + b.draws, 0);
62
+ const fulfilled_positions = analytics.reduce((a,b) => a + parseFloat(b.fulfilled_positions as any), 0);
63
+ const winnings = analytics.reduce((a,b) => a + b.winnings, 0);
64
+ const original_stake = analytics.reduce((a,b) => a + b.original_stake, 0);
65
+ const cash_rcvd = analytics.reduce((a,b) => a + b.cash_rcvd, 0);
66
+
67
+ const win_pct = (wins + (draws / 2)) / fulfilled_positions
68
+ const earnings = (winnings + cash_rcvd) - original_stake
69
+ const roi_pct = earnings / original_stake
70
+ return {
71
+ winnings,
72
+ original_stake,
73
+ wins,
74
+ losses,
75
+ draws,
76
+ net_winnings: 0,
77
+ player_id: '',
78
+ fulfilled_positions,
79
+ cash_rcvd,
80
+ earnings,
81
+ win_pct,
82
+ roi_pct
83
+ }
84
+ },
85
+ getTimeOptions: () => {
86
+ const time_options = [
87
+ { label: 'All Time', to: moment().unix(), from: moment().subtract(7, 'years').unix() },
88
+ { label: 'Last 7 Days', to: moment().unix(), from: moment().subtract(7, 'days').unix() }
89
+ ]
90
+ return time_options
91
+ }
92
+ }
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ import { Text, View } from "../../Components/Themed"
3
+ import type { EventProps, OrderProps, PublicPlayerProps } from "../../types"
4
+ import { FlatList, Image } from 'react-native';
5
+ import moment from 'moment-mini';
6
+ import OrderGradeBar from '../../MarketComponents/components/OrderGradeBar';
7
+
8
+ type ActionListProps = {
9
+ orders:OrderProps[],
10
+ events:EventProps[],
11
+ players:PublicPlayerProps[]
12
+ }
13
+
14
+ const ActionList = ({ orders, events, players }:ActionListProps) => {
15
+
16
+ const renderAction = (data:{ item:OrderProps, index:number }) => {
17
+ const event = events.find(e => e.event_id == data.item.event_id);
18
+ if(!event){ return <></> }
19
+ const player = players.find(p => p.player_id == data.item.player_id)
20
+ return (
21
+ <View float style={{ margin:10 }}>
22
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:8, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
23
+ <Text style={{ flex:1 }} theme='h2'>{event.event_title}</Text>
24
+ <Text theme='action'>{moment(data.item.create_datetime).fromNow()}</Text>
25
+ </View>
26
+ <View transparent style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
27
+ {player ?
28
+ <Image
29
+ source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
30
+ style={{ height:35, width:35, borderRadius:100 }}
31
+ resizeMode='cover'
32
+ />
33
+ :<></>}
34
+ <View transparent style={{ flex:1, marginLeft:10 }}>
35
+ <Text theme='h1'>{data.item.title}</Text>
36
+ <Text theme='description'>@{player?.username}</Text>
37
+ </View>
38
+ {data.item.status == 'approved' && data.item.grade ?
39
+ <View transparent style={{ padding:5, marginRight:10 }}>
40
+ <OrderGradeBar
41
+ grade={data.item.grade}
42
+ view_type='book'
43
+ />
44
+ </View>
45
+ :<></>}
46
+ </View>
47
+ </View>
48
+ )
49
+ }
50
+
51
+
52
+ return (
53
+ <View transparent style={{ flex:1 }}>
54
+ <FlatList
55
+ data={orders}
56
+ renderItem={renderAction}
57
+ keyExtractor={(item) => item.order_id.toString()}
58
+ key={'campaign_action'}
59
+ />
60
+ </View>
61
+ )
62
+ }
63
+
64
+ export default ActionList
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import { Text, View } from "../../Components/Themed"
3
+ import { useColors } from '../../constants/useColors';
4
+
5
+ type AnalyticsCardProps = {
6
+ label:string,
7
+ value:number,
8
+ value_label:string,
9
+ success_limit:number
10
+ }
11
+
12
+ const AnalyticsCard = ({ label, value, success_limit, value_label }:AnalyticsCardProps) => {
13
+ const Colors = useColors();
14
+ const color = value >= success_limit ? Colors.text.success : Colors.text.error
15
+
16
+
17
+ return (
18
+ <View float>
19
+ <View type='header' style={{ padding:8, borderTopRightRadius:8, borderTopLeftRadius:8}}>
20
+ <Text theme='h2'>{label}</Text>
21
+ </View>
22
+ <View transparent style={{ flex:1, padding:15 }}>
23
+ <Text theme='h1' color={color}>{value_label}</Text>
24
+ </View>
25
+ </View>
26
+ )
27
+ }
28
+
29
+ export default AnalyticsCard
@@ -0,0 +1,88 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { View } from "../../Components/Themed"
3
+ import ProgressTimer from "./ProgressTimer"
4
+ import type { CampaignParticipantProps, CampaignProps, OrderAnalyticsProps, OrderProps } from '../../types';
5
+
6
+ type AutoManagerProps = {
7
+ active?:boolean,
8
+ campaign:CampaignProps,
9
+ campaign_participants:CampaignParticipantProps[],
10
+ analytics:OrderAnalyticsProps[],
11
+ orders:OrderProps[]
12
+ onChangeParticipant:(cp:CampaignParticipantProps) => void,
13
+ onChangeAd: (ad:{url:string}) => void
14
+ }
15
+
16
+ const AutoManager = ({ campaign, active, campaign_participants, onChangeParticipant, onChangeAd }:AutoManagerProps) => {
17
+ const active_participants = campaign_participants.filter(cp => cp.status == 'active');
18
+ const [ current_type, setCurrentType ] = useState('participant');
19
+ const [ started, setStarted ] = useState(false);
20
+ const [ timer_id, setTimerId ] = useState(Math.random().toString());
21
+ const [ active_ad, setActiveAd ] = useState<number>(0);
22
+ const [ active_participant, setActiveParticipant ] = useState<number>(0);
23
+
24
+ useEffect(() => {
25
+ if(!active || started){ return }
26
+ setStarted(true);
27
+ if(active_participants.length == 0){
28
+ setCurrentType('participant');
29
+ if(!campaign.ads || campaign.ads.length == 0){ return }
30
+ handleTimesUpAd(0)
31
+ } else {
32
+ setCurrentType('ad');
33
+ if(active_participants.length == 0){ return }
34
+ handleTimesUpParticipant(0);
35
+ }
36
+ },[active, active_participants.length, campaign.ads])
37
+
38
+ const handleTimesUpAd = (index:number) => {
39
+ if(!campaign.ads){ return }
40
+ if(campaign.ads.length == 0){ return }
41
+ let active_index = index
42
+ let next_ad = campaign.ads[active_index]
43
+ if(!next_ad){
44
+ active_index = 0
45
+ next_ad = campaign.ads[active_index]
46
+ }
47
+ if(!next_ad){ return }
48
+ setCurrentType('participant')
49
+ onChangeAd(next_ad)
50
+ setActiveAd(active_index);
51
+
52
+ setTimerId(Math.random().toString())
53
+ }
54
+
55
+ const handleTimesUpParticipant = (index:number) => {
56
+ let active_index = index
57
+ let next_cp = active_participants[active_index]
58
+ if(!next_cp){
59
+ active_index = 0
60
+ next_cp = active_participants[active_index]
61
+ }
62
+ if(!next_cp){ return }
63
+ onChangeParticipant(next_cp)
64
+ setActiveParticipant(active_index);
65
+ setCurrentType('ad');
66
+ setTimerId(Math.random().toString())
67
+ }
68
+
69
+ const handleTimesUp = () => {
70
+ if(current_type == 'ad'){ handleTimesUpAd(active_ad + 1) }
71
+ if(current_type == 'participant'){ handleTimesUpParticipant(active_participant + 1) }
72
+ }
73
+
74
+ if(!active || !started){ return <></> }
75
+
76
+ return (
77
+ <View transparent>
78
+ <ProgressTimer
79
+ total_time={10}
80
+ time_id={timer_id}
81
+ onTimesUp={() => handleTimesUp()}
82
+ />
83
+ </View>
84
+ )
85
+
86
+ }
87
+
88
+ export default AutoManager
@@ -0,0 +1,111 @@
1
+ import { Image } from "react-native";
2
+ import { Icons } from "../../../src/Components";
3
+ import { Text, View } from "../../../src/Components/Themed";
4
+ import type { AthleteProps, EventProps, OrderProps, PublicPlayerProps, TeamProps } from "../../../src/types"
5
+ import React from 'react';
6
+ import OrderGradeBar from "../../../src/MarketComponents/components/OrderGradeBar";
7
+ import { MarketComponentHelpers } from "../../../src/MarketComponents/api";
8
+ import QRCode from "react-qr-code";
9
+ import { useColors } from "../../../src/constants/useColors";
10
+ import moment from "moment-mini";
11
+ import ProgressTimer from "./ProgressTimer";
12
+
13
+ type BetAlertProps = {
14
+ order:OrderProps,
15
+ team?:TeamProps,
16
+ athlete?:AthleteProps,
17
+ event?:EventProps,
18
+ player?:PublicPlayerProps,
19
+ color_mode?:'light'|'dark'
20
+
21
+ onClose:() => void
22
+ }
23
+
24
+ const BetAlert = ({ player, order, team, athlete, event, color_mode, onClose }:BetAlertProps) => {
25
+ const Colors = useColors({ mode: color_mode });
26
+
27
+ return (
28
+ <View float style={{ width:350 }}>
29
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:18, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
30
+ <Icons.BettorEdgeIcon size={18} color={Colors.text.h1} />
31
+ <View transparent style={{ flex:1, marginLeft:20, marginRight:10 }}>
32
+ <Text theme='h1'>NEW BET ALERT!</Text>
33
+ <Text theme='description' style={{ marginTop:5 }}>@{player?.username} {`\u2022`} {moment(order.create_datetime).fromNow()}</Text>
34
+ </View>
35
+
36
+ </View>
37
+ <View>
38
+ {event ?
39
+ <View style={{ flexDirection:'row', alignItems:'center', justifyContent:'center', padding:10 }}>
40
+ <Image
41
+ source={{ uri: event?.away?.image?.url }}
42
+ style={{ height:40, width:40, marginRight:10 }}
43
+ resizeMode='cover'
44
+ />
45
+ <Text theme='h2'>{event.away?.market_name}</Text>
46
+ <Text theme='h1' style={{ marginRight:20, marginLeft:20 }}>VS</Text>
47
+ <Image
48
+ source={{ uri: event?.home?.image?.url }}
49
+ style={{ height:40, width:40, marginRight:10 }}
50
+ resizeMode='cover'
51
+ />
52
+ <Text theme='h2'>{event.home?.market_name}</Text>
53
+ </View>
54
+ :<></>}
55
+ {player ?
56
+ <View>
57
+ <Image
58
+ source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
59
+ style={{ height:200, width:350 }}
60
+ resizeMode='cover'
61
+ />
62
+
63
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
64
+ {team ?
65
+ <Image
66
+ source={{ uri: team.image?.url }}
67
+ style={{ height:60, width:60 }}
68
+ resizeMode='cover'
69
+ />
70
+ :athlete ?
71
+ <Image
72
+ source={{ uri: athlete.image?.url }}
73
+ style={{ height:60, width:60 }}
74
+ resizeMode='cover'
75
+ />
76
+ :<></>}
77
+
78
+ <View transparent style={{ flex:1, marginLeft:10 }}>
79
+ <Text theme='h1'>{order.title}</Text>
80
+ <Text style={{ marginTop:3 }} theme='description'>{MarketComponentHelpers.getOddsLabel(order.odds)} {`\u2022`} {(order.probability * 100).toFixed(2)}%</Text>
81
+ </View>
82
+ {order.grade ?
83
+ <OrderGradeBar
84
+ grade={order.grade}
85
+ view_type='card'
86
+ />
87
+ :<></>}
88
+ </View>
89
+ </View>
90
+ :<></>}
91
+
92
+ </View>
93
+ <View type='header' style={{alignItems:'center', padding:10}}>
94
+ <QRCode
95
+ size={100}
96
+ value={`https://play.bettoredge.com/markets?order=${order.order_id}&type=fade`}
97
+ />
98
+ <Text textAlign='center' theme='h2' style={{ marginTop:4 }}>FADE ME NOW!</Text>
99
+ </View>
100
+ <View type='footer' style={{ borderBottomRightRadius:8, borderBottomLeftRadius:8, }}>
101
+ <ProgressTimer
102
+ onTimesUp={() => onClose()}
103
+ time_id={order.order_id.toString()}
104
+ total_time={15}
105
+ />
106
+ </View>
107
+ </View>
108
+ )
109
+ }
110
+
111
+ export default BetAlert
@@ -0,0 +1,54 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { View } from "../../Components/Themed"
3
+ import moment from 'moment-mini';
4
+ import { CampaignApi, CampaignHelpers } from '../api';
5
+ import type { OrderAnalyticsProps } from '../../types';
6
+
7
+
8
+ type CampaignAnalyticsProps = {
9
+ campaign_id:string
10
+ }
11
+
12
+ const CampaignAnalytics = ({ campaign_id }:CampaignAnalyticsProps) => {
13
+
14
+ const time_options = [
15
+ { label: 'Last 7 Days', to: moment().unix(), from: moment().subtract(7, 'days').unix() }
16
+ ]
17
+
18
+ const [ module_state, setModuleState ] = useState<{
19
+ loading:boolean,
20
+ time_option: any,
21
+ analytics:OrderAnalyticsProps[]
22
+ }>({
23
+ loading:false,
24
+ time_option: time_options[0],
25
+ analytics: []
26
+ });
27
+ const { analytics } = module_state;
28
+
29
+ useEffect(() => {
30
+ let option = time_options[0]
31
+ if(!option){ return }
32
+ handleLoadAnalytics(option);
33
+ },[])
34
+
35
+ const handleLoadAnalytics = async(option:{ label:string, to:number, from:number }) => {
36
+ CampaignApi.setEnvironment();
37
+ const analytics = await CampaignApi.getCampaignAnalytics(campaign_id, option.to, option.from);
38
+ setModuleState({
39
+ ...module_state,
40
+ time_option: option,
41
+ analytics
42
+ })
43
+ }
44
+
45
+ const agg = CampaignHelpers.aggregateAnalytics(analytics)
46
+ console.log(agg)
47
+ return (
48
+ <View>
49
+
50
+ </View>
51
+ )
52
+ }
53
+
54
+ export default CampaignAnalytics
@@ -0,0 +1,78 @@
1
+ import React from 'react';
2
+ import { Text, View } from "../../Components/Themed"
3
+ import type { CampaignParticipantProps, EventProps, OrderAnalyticsProps, OrderProps, PublicPlayerProps } from "../../types"
4
+ import { Image } from 'react-native';
5
+ import moment from 'moment-mini';
6
+ import ActionList from './ActionList';
7
+ import { CampaignHelpers } from '../api';
8
+ import AnalyticsCard from './AnalyticsCard';
9
+
10
+ type ParticipantCardProps = {
11
+ campaign_participant:CampaignParticipantProps,
12
+ player:PublicPlayerProps,
13
+ orders:OrderProps[],
14
+ analytics:OrderAnalyticsProps[],
15
+ events:EventProps[]
16
+ }
17
+ const ParticipantCard = ({ player, campaign_participant, orders, events, analytics }:ParticipantCardProps) => {
18
+ const agg = CampaignHelpers.aggregateAnalytics(analytics);
19
+
20
+ return (
21
+ <View transparent style={{ marginTop:65, flex:1 }}>
22
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
23
+ <View float style={{ padding:2, borderRadius:100, marginTop:-65, marginLeft:10 }}>
24
+ <Image
25
+ source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
26
+ style={{ height:100, width:100, borderRadius:100}}
27
+ />
28
+ </View>
29
+ <View transparent style={{ flex:1, marginLeft:10 }}>
30
+ <Text theme='h1'>@{player.username}</Text>
31
+ <Text theme='description' style={{ marginTop:3 }}>{player.bio ?? `Last visited ${moment(campaign_participant.last_update_datetime).fromNow()}`}</Text>
32
+ </View>
33
+ </View>
34
+ <View type='header' style={{ flexDirection:'row', padding:6 }}>
35
+ <View transparent style={{ margin:4, flex:1 }}>
36
+ <AnalyticsCard
37
+ label='Bets Fulfilled'
38
+ value={agg.fulfilled_positions}
39
+ success_limit={0}
40
+ value_label={agg.fulfilled_positions.toString()}
41
+ />
42
+ </View>
43
+ <View transparent style={{ margin:4, flex:1 }}>
44
+ <AnalyticsCard
45
+ label='ROI %'
46
+ value={agg.roi_pct}
47
+ success_limit={0}
48
+ value_label={`${(agg.roi_pct * 100).toFixed(2)}%`}
49
+ />
50
+ </View>
51
+ <View transparent style={{ margin:4, flex:1 }}>
52
+ <AnalyticsCard
53
+ label={`Win %`}
54
+ value={agg.win_pct}
55
+ success_limit={0.5}
56
+ value_label={`${(agg.win_pct * 100).toFixed(2)}%`}
57
+ />
58
+ </View>
59
+
60
+ </View>
61
+ <View transparent style={{ flex:1 }}>
62
+ <View type='header' style={{ flexDirection:'row', padding:10 }}>
63
+ <View transparent style={{ flex:1 }}>
64
+ <Text theme='h1'>Recent Action</Text>
65
+ <Text theme='description' style={{ marginTop:4 }}>Bets recently placed by @{player.username}</Text>
66
+ </View>
67
+ </View>
68
+ <ActionList
69
+ orders={orders}
70
+ players={[player]}
71
+ events={events}
72
+ />
73
+ </View>
74
+ </View>
75
+ )
76
+ }
77
+
78
+ export default ParticipantCard