be-components 7.3.9 → 7.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 (157) hide show
  1. package/lib/commonjs/CreateEngagement/index.js +3 -0
  2. package/lib/commonjs/CreateEngagement/index.js.map +1 -1
  3. package/lib/commonjs/FlashMarket/api/index.js +61 -0
  4. package/lib/commonjs/FlashMarket/api/index.js.map +1 -1
  5. package/lib/commonjs/FlashMarket/components/ManageFlashMarket.js +91 -83
  6. package/lib/commonjs/FlashMarket/components/ManageFlashMarket.js.map +1 -1
  7. package/lib/commonjs/FlashMarket/index.js +67 -42
  8. package/lib/commonjs/FlashMarket/index.js.map +1 -1
  9. package/lib/commonjs/MyAction/api/index.js +580 -0
  10. package/lib/commonjs/MyAction/api/index.js.map +1 -0
  11. package/lib/commonjs/MyAction/components/BracketRow.js +67 -0
  12. package/lib/commonjs/MyAction/components/BracketRow.js.map +1 -0
  13. package/lib/commonjs/MyAction/components/CompetitionRow.js +68 -0
  14. package/lib/commonjs/MyAction/components/CompetitionRow.js.map +1 -0
  15. package/lib/commonjs/MyAction/components/ContestStatRow.js +265 -0
  16. package/lib/commonjs/MyAction/components/ContestStatRow.js.map +1 -0
  17. package/lib/commonjs/MyAction/components/FlashRow.js +131 -0
  18. package/lib/commonjs/MyAction/components/FlashRow.js.map +1 -0
  19. package/lib/commonjs/MyAction/components/ParlayRow.js +236 -0
  20. package/lib/commonjs/MyAction/components/ParlayRow.js.map +1 -0
  21. package/lib/commonjs/MyAction/components/SquaresRow.js +83 -0
  22. package/lib/commonjs/MyAction/components/SquaresRow.js.map +1 -0
  23. package/lib/commonjs/MyAction/index.js +354 -0
  24. package/lib/commonjs/MyAction/index.js.map +1 -0
  25. package/lib/commonjs/PartnerPortal/components/EmbedManager.js +42 -0
  26. package/lib/commonjs/PartnerPortal/components/EmbedManager.js.map +1 -1
  27. package/lib/commonjs/PartnerPortal/components/StringSelector.js +90 -0
  28. package/lib/commonjs/PartnerPortal/components/StringSelector.js.map +1 -0
  29. package/lib/commonjs/index.js +7 -0
  30. package/lib/commonjs/index.js.map +1 -1
  31. package/lib/commonjs/types.d.js.map +1 -1
  32. package/lib/module/CreateEngagement/index.js +3 -0
  33. package/lib/module/CreateEngagement/index.js.map +1 -1
  34. package/lib/module/FlashMarket/api/index.js +61 -0
  35. package/lib/module/FlashMarket/api/index.js.map +1 -1
  36. package/lib/module/FlashMarket/components/ManageFlashMarket.js +91 -83
  37. package/lib/module/FlashMarket/components/ManageFlashMarket.js.map +1 -1
  38. package/lib/module/FlashMarket/index.js +67 -42
  39. package/lib/module/FlashMarket/index.js.map +1 -1
  40. package/lib/module/MyAction/api/index.js +573 -0
  41. package/lib/module/MyAction/api/index.js.map +1 -0
  42. package/lib/module/MyAction/components/BracketRow.js +60 -0
  43. package/lib/module/MyAction/components/BracketRow.js.map +1 -0
  44. package/lib/module/MyAction/components/CompetitionRow.js +61 -0
  45. package/lib/module/MyAction/components/CompetitionRow.js.map +1 -0
  46. package/lib/module/MyAction/components/ContestStatRow.js +258 -0
  47. package/lib/module/MyAction/components/ContestStatRow.js.map +1 -0
  48. package/lib/module/MyAction/components/FlashRow.js +124 -0
  49. package/lib/module/MyAction/components/FlashRow.js.map +1 -0
  50. package/lib/module/MyAction/components/ParlayRow.js +229 -0
  51. package/lib/module/MyAction/components/ParlayRow.js.map +1 -0
  52. package/lib/module/MyAction/components/SquaresRow.js +76 -0
  53. package/lib/module/MyAction/components/SquaresRow.js.map +1 -0
  54. package/lib/module/MyAction/index.js +344 -0
  55. package/lib/module/MyAction/index.js.map +1 -0
  56. package/lib/module/PartnerPortal/components/EmbedManager.js +42 -0
  57. package/lib/module/PartnerPortal/components/EmbedManager.js.map +1 -1
  58. package/lib/module/PartnerPortal/components/StringSelector.js +83 -0
  59. package/lib/module/PartnerPortal/components/StringSelector.js.map +1 -0
  60. package/lib/module/index.js +2 -1
  61. package/lib/module/index.js.map +1 -1
  62. package/lib/module/types.d.js.map +1 -1
  63. package/lib/typescript/lib/commonjs/CreateEngagement/index.d.ts.map +1 -1
  64. package/lib/typescript/lib/commonjs/FlashMarket/api/index.d.ts +1 -0
  65. package/lib/typescript/lib/commonjs/FlashMarket/api/index.d.ts.map +1 -1
  66. package/lib/typescript/lib/commonjs/FlashMarket/components/ManageFlashMarket.d.ts.map +1 -1
  67. package/lib/typescript/lib/commonjs/FlashMarket/index.d.ts.map +1 -1
  68. package/lib/typescript/lib/commonjs/MyAction/api/index.d.ts +110 -0
  69. package/lib/typescript/lib/commonjs/MyAction/api/index.d.ts.map +1 -0
  70. package/lib/typescript/lib/commonjs/MyAction/components/BracketRow.d.ts +8 -0
  71. package/lib/typescript/lib/commonjs/MyAction/components/BracketRow.d.ts.map +1 -0
  72. package/lib/typescript/lib/commonjs/MyAction/components/CompetitionRow.d.ts +9 -0
  73. package/lib/typescript/lib/commonjs/MyAction/components/CompetitionRow.d.ts.map +1 -0
  74. package/lib/typescript/lib/commonjs/MyAction/components/ContestStatRow.d.ts +15 -0
  75. package/lib/typescript/lib/commonjs/MyAction/components/ContestStatRow.d.ts.map +1 -0
  76. package/lib/typescript/lib/commonjs/MyAction/components/FlashRow.d.ts +10 -0
  77. package/lib/typescript/lib/commonjs/MyAction/components/FlashRow.d.ts.map +1 -0
  78. package/lib/typescript/lib/commonjs/MyAction/components/ParlayRow.d.ts +15 -0
  79. package/lib/typescript/lib/commonjs/MyAction/components/ParlayRow.d.ts.map +1 -0
  80. package/lib/typescript/lib/commonjs/MyAction/components/SquaresRow.d.ts +8 -0
  81. package/lib/typescript/lib/commonjs/MyAction/components/SquaresRow.d.ts.map +1 -0
  82. package/lib/typescript/lib/commonjs/MyAction/index.d.ts +7 -0
  83. package/lib/typescript/lib/commonjs/MyAction/index.d.ts.map +1 -0
  84. package/lib/typescript/lib/commonjs/PartnerPortal/components/EmbedManager.d.ts.map +1 -1
  85. package/lib/typescript/lib/commonjs/PartnerPortal/components/StringSelector.d.ts +8 -0
  86. package/lib/typescript/lib/commonjs/PartnerPortal/components/StringSelector.d.ts.map +1 -0
  87. package/lib/typescript/lib/commonjs/index.d.ts +1 -0
  88. package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
  89. package/lib/typescript/lib/module/CreateEngagement/index.d.ts.map +1 -1
  90. package/lib/typescript/lib/module/FlashMarket/api/index.d.ts +1 -0
  91. package/lib/typescript/lib/module/FlashMarket/api/index.d.ts.map +1 -1
  92. package/lib/typescript/lib/module/FlashMarket/components/ManageFlashMarket.d.ts.map +1 -1
  93. package/lib/typescript/lib/module/FlashMarket/index.d.ts.map +1 -1
  94. package/lib/typescript/lib/module/MyAction/api/index.d.ts +110 -0
  95. package/lib/typescript/lib/module/MyAction/api/index.d.ts.map +1 -0
  96. package/lib/typescript/lib/module/MyAction/components/BracketRow.d.ts +8 -0
  97. package/lib/typescript/lib/module/MyAction/components/BracketRow.d.ts.map +1 -0
  98. package/lib/typescript/lib/module/MyAction/components/CompetitionRow.d.ts +9 -0
  99. package/lib/typescript/lib/module/MyAction/components/CompetitionRow.d.ts.map +1 -0
  100. package/lib/typescript/lib/module/MyAction/components/ContestStatRow.d.ts +15 -0
  101. package/lib/typescript/lib/module/MyAction/components/ContestStatRow.d.ts.map +1 -0
  102. package/lib/typescript/lib/module/MyAction/components/FlashRow.d.ts +10 -0
  103. package/lib/typescript/lib/module/MyAction/components/FlashRow.d.ts.map +1 -0
  104. package/lib/typescript/lib/module/MyAction/components/ParlayRow.d.ts +15 -0
  105. package/lib/typescript/lib/module/MyAction/components/ParlayRow.d.ts.map +1 -0
  106. package/lib/typescript/lib/module/MyAction/components/SquaresRow.d.ts +8 -0
  107. package/lib/typescript/lib/module/MyAction/components/SquaresRow.d.ts.map +1 -0
  108. package/lib/typescript/lib/module/MyAction/index.d.ts +7 -0
  109. package/lib/typescript/lib/module/MyAction/index.d.ts.map +1 -0
  110. package/lib/typescript/lib/module/PartnerPortal/components/EmbedManager.d.ts.map +1 -1
  111. package/lib/typescript/lib/module/PartnerPortal/components/StringSelector.d.ts +8 -0
  112. package/lib/typescript/lib/module/PartnerPortal/components/StringSelector.d.ts.map +1 -0
  113. package/lib/typescript/lib/module/index.d.ts +2 -1
  114. package/lib/typescript/lib/module/index.d.ts.map +1 -1
  115. package/lib/typescript/src/CreateEngagement/index.d.ts.map +1 -1
  116. package/lib/typescript/src/FlashMarket/api/index.d.ts +1 -0
  117. package/lib/typescript/src/FlashMarket/api/index.d.ts.map +1 -1
  118. package/lib/typescript/src/FlashMarket/components/ManageFlashMarket.d.ts.map +1 -1
  119. package/lib/typescript/src/FlashMarket/index.d.ts.map +1 -1
  120. package/lib/typescript/src/MyAction/api/index.d.ts +103 -0
  121. package/lib/typescript/src/MyAction/api/index.d.ts.map +1 -0
  122. package/lib/typescript/src/MyAction/components/BracketRow.d.ts +10 -0
  123. package/lib/typescript/src/MyAction/components/BracketRow.d.ts.map +1 -0
  124. package/lib/typescript/src/MyAction/components/CompetitionRow.d.ts +15 -0
  125. package/lib/typescript/src/MyAction/components/CompetitionRow.d.ts.map +1 -0
  126. package/lib/typescript/src/MyAction/components/ContestStatRow.d.ts +18 -0
  127. package/lib/typescript/src/MyAction/components/ContestStatRow.d.ts.map +1 -0
  128. package/lib/typescript/src/MyAction/components/FlashRow.d.ts +12 -0
  129. package/lib/typescript/src/MyAction/components/FlashRow.d.ts.map +1 -0
  130. package/lib/typescript/src/MyAction/components/ParlayRow.d.ts +18 -0
  131. package/lib/typescript/src/MyAction/components/ParlayRow.d.ts.map +1 -0
  132. package/lib/typescript/src/MyAction/components/SquaresRow.d.ts +10 -0
  133. package/lib/typescript/src/MyAction/components/SquaresRow.d.ts.map +1 -0
  134. package/lib/typescript/src/MyAction/index.d.ts +14 -0
  135. package/lib/typescript/src/MyAction/index.d.ts.map +1 -0
  136. package/lib/typescript/src/PartnerPortal/components/EmbedManager.d.ts.map +1 -1
  137. package/lib/typescript/src/PartnerPortal/components/StringSelector.d.ts +10 -0
  138. package/lib/typescript/src/PartnerPortal/components/StringSelector.d.ts.map +1 -0
  139. package/lib/typescript/src/index.d.ts +2 -1
  140. package/lib/typescript/src/index.d.ts.map +1 -1
  141. package/package.json +3 -3
  142. package/src/CreateEngagement/index.tsx +4 -1
  143. package/src/FlashMarket/api/index.ts +72 -0
  144. package/src/FlashMarket/components/ManageFlashMarket.tsx +28 -2
  145. package/src/FlashMarket/index.tsx +39 -24
  146. package/src/MyAction/api/index.ts +393 -0
  147. package/src/MyAction/components/BracketRow.tsx +34 -0
  148. package/src/MyAction/components/CompetitionRow.tsx +39 -0
  149. package/src/MyAction/components/ContestStatRow.tsx +153 -0
  150. package/src/MyAction/components/FlashRow.tsx +74 -0
  151. package/src/MyAction/components/ParlayRow.tsx +137 -0
  152. package/src/MyAction/components/SquaresRow.tsx +55 -0
  153. package/src/MyAction/index.tsx +316 -0
  154. package/src/PartnerPortal/components/EmbedManager.tsx +20 -0
  155. package/src/PartnerPortal/components/StringSelector.tsx +55 -0
  156. package/src/index.tsx +2 -0
  157. package/src/types.d.ts +12 -0
@@ -0,0 +1,14 @@
1
+ /**
2
+ * My Action Components
3
+ * This is responsible for viewing all of your action in one spot
4
+ * @returns
5
+ */
6
+ import React from 'react';
7
+ import type { MyPlayerProps } from '../types';
8
+ type MyActionProps = {
9
+ me: MyPlayerProps;
10
+ market_type: 'FOR_MONEY' | 'FREE';
11
+ };
12
+ declare const MyAction: ({ me, market_type }: MyActionProps) => React.JSX.Element;
13
+ export default MyAction;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/MyAction/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAA2O,aAAa,EAAoJ,MAAM,UAAU,CAAC;AAUza,KAAK,aAAa,GAAG;IACjB,EAAE,EAAC,aAAa,CAAC;IACjB,WAAW,EAAC,WAAW,GAAC,MAAM,CAAA;CACjC,CAAA;AAID,QAAA,MAAM,QAAQ,GAAI,qBAAoB,aAAa,sBAgSlD,CAAA;AAED,eAAe,QAAQ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"EmbedManager.d.ts","sourceRoot":"","sources":["../../../../../src/PartnerPortal/components/EmbedManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAmE,kBAAkB,EAAE,aAAa,EAAmC,MAAM,aAAa,CAAC;AAEvK,OAAO,EAAgD,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAW5F,KAAK,iBAAiB,GAAG;IACrB,gBAAgB,EAAC,MAAM,CAAC;IACxB,EAAE,EAAC,aAAa,CAAC;IACjB,KAAK,CAAC,EAAC,OAAO,CAAC;IACf,eAAe,CAAC,EAAC,CAAC,GAAG,EAAC,kBAAkB,KAAK,IAAI,CAAC;IAClD,YAAY,CAAC,EAAC,SAAS,CAAC;IACxB,YAAY,CAAC,EAAC,SAAS,CAAC;IACxB,UAAU,EAAC,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,QAAA,MAAM,YAAY,GAAI,mGAAkG,iBAAiB,sBAggBxI,CAAA;AAED,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"EmbedManager.d.ts","sourceRoot":"","sources":["../../../../../src/PartnerPortal/components/EmbedManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAmE,kBAAkB,EAAE,aAAa,EAAmC,MAAM,aAAa,CAAC;AAEvK,OAAO,EAAgD,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAY5F,KAAK,iBAAiB,GAAG;IACrB,gBAAgB,EAAC,MAAM,CAAC;IACxB,EAAE,EAAC,aAAa,CAAC;IACjB,KAAK,CAAC,EAAC,OAAO,CAAC;IACf,eAAe,CAAC,EAAC,CAAC,GAAG,EAAC,kBAAkB,KAAK,IAAI,CAAC;IAClD,YAAY,CAAC,EAAC,SAAS,CAAC;IACxB,YAAY,CAAC,EAAC,SAAS,CAAC;IACxB,UAAU,EAAC,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,QAAA,MAAM,YAAY,GAAI,mGAAkG,iBAAiB,sBAmhBxI,CAAA;AAED,eAAe,YAAY,CAAA"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import type { StringSelectorOptionProps } from "../../types";
3
+ type StringSelectorProps = {
4
+ active_value?: string;
5
+ options: StringSelectorOptionProps[];
6
+ onSelectOption: (option: StringSelectorOptionProps | undefined) => void;
7
+ };
8
+ declare const StringSelector: ({ active_value, options, onSelectOption }: StringSelectorProps) => React.JSX.Element;
9
+ export default StringSelector;
10
+ //# sourceMappingURL=StringSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StringSelector.d.ts","sourceRoot":"","sources":["../../../../../src/PartnerPortal/components/StringSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAM7D,KAAK,mBAAmB,GAAG;IACvB,YAAY,CAAC,EAAC,MAAM,CAAC;IACrB,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,cAAc,EAAC,CAAC,MAAM,EAAC,yBAAyB,GAAG,SAAS,KAAK,IAAI,CAAA;CACxE,CAAA;AACD,QAAA,MAAM,cAAc,GAAI,2CAA0C,mBAAmB,sBAwCpF,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -66,5 +66,6 @@ import EmbedManager from './PartnerPortal/components/EmbedManager';
66
66
  import CreateEmbed from './PartnerPortal/components/CreateEmbed';
67
67
  import ReferralCodeManager from './PartnerPortal/components/ReferralCodeManager';
68
68
  import FlashCampaignManager from './PartnerPortal/components/FlashCampaignManager';
69
- export { Authenticator, Observer, CreateEmbed, ReferralCodeManager, CreateEngagement, DiscordConnectionManager, BEEventApi, FlashCampaignManager, EmbedManager, RankingsCard, ManageFlashMarket, BELinkApi, PartnerPortal, SquaresManager, GuideView, BetMatch, ManageFilter, Ticker, Premium, CreateGroupWizard, LeaderboardCard, GroupComponent, LocationTracker, BEClarity, FlashMarket, ContactsCard, PlayerRecommender, GolfScoreboard, ContactsSelector, Campaign, BEPostHog, ManageBracketCompetitionForm, NotificationModule, FlashHolder, useNotifications, ClaritySmartEvents, ProfileManager, CompetitionManager, Components, SocialComponents, APIOverrides, LinearGradient, usePlayerLocation, BettorSearch, Colors, MyWallet, Share, Checkout, MarketComponents, EventComponents, PollCampaign, PollCampaignApi, PollApi, MarketMaker, CompetitionModule, SeasonManager, CreateCompetitionForm, CreateSeasonForm, SeasonModule, AdminCompetitionList, AdServer, Leaderboard, AdProvider, BracketRoom, SquaresModule, SocketManager, PromotedOrder, EngageModule, CompetitionCard, SquaresCompetitionCard, BracketCompetitionCard, SeasonCard };
69
+ import MyAction from './MyAction';
70
+ export { Authenticator, Observer, MyAction, CreateEmbed, ReferralCodeManager, CreateEngagement, DiscordConnectionManager, BEEventApi, FlashCampaignManager, EmbedManager, RankingsCard, ManageFlashMarket, BELinkApi, PartnerPortal, SquaresManager, GuideView, BetMatch, ManageFilter, Ticker, Premium, CreateGroupWizard, LeaderboardCard, GroupComponent, LocationTracker, BEClarity, FlashMarket, ContactsCard, PlayerRecommender, GolfScoreboard, ContactsSelector, Campaign, BEPostHog, ManageBracketCompetitionForm, NotificationModule, FlashHolder, useNotifications, ClaritySmartEvents, ProfileManager, CompetitionManager, Components, SocialComponents, APIOverrides, LinearGradient, usePlayerLocation, BettorSearch, Colors, MyWallet, Share, Checkout, MarketComponents, EventComponents, PollCampaign, PollCampaignApi, PollApi, MarketMaker, CompetitionModule, SeasonManager, CreateCompetitionForm, CreateSeasonForm, SeasonModule, AdminCompetitionList, AdServer, Leaderboard, AdProvider, BracketRoom, SquaresModule, SocketManager, PromotedOrder, EngageModule, CompetitionCard, SquaresCompetitionCard, BracketCompetitionCard, SeasonCard };
70
71
  //# sourceMappingURL=index.d.ts.map
@@ -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,OAA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YAAY,EACZ,eAAe,EACf,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,WAAW,EACX,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": "7.3.9",
3
+ "version": "7.4.2",
4
4
  "description": "Components for BettorEdge Apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -32,7 +32,7 @@
32
32
  "typecheck": "tsc --noEmit",
33
33
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
34
34
  "clean": "del-cli lib",
35
- "prepare": "NODE_OPTIONS='--max-old-space-size=5500' bob build",
35
+ "prepare": "NODE_OPTIONS='--max-old-space-size=6000' bob build",
36
36
  "release": "release-it"
37
37
  },
38
38
  "keywords": [
@@ -172,7 +172,7 @@
172
172
  "@paypal/react-paypal-js": "^8.3.0",
173
173
  "@react-native-async-storage/async-storage": "2.1.2",
174
174
  "@react-native-community/datetimepicker": "^8.4.5",
175
- "@react-native-community/slider": "4.5.6",
175
+ "@react-native-community/slider": "^5.0.1",
176
176
  "@react-spring/web": "^9.7.3",
177
177
  "@types/uuid": "^9.0.8",
178
178
  "axios": "^1.6.8",
@@ -106,7 +106,10 @@ const CreateEngagement = ({ float, player, bracket_id, flash_campaign_id, init_e
106
106
  groups: my_grups.groups,
107
107
  companies: my_comps.companies,
108
108
  loading:false
109
- })
109
+ });
110
+ if(act_company?.company_image?.url){
111
+ setDraftImage(act_company.company_image)
112
+ }
110
113
  }
111
114
  const errors = CreateEngagementHelpers.isStepValid(active_step, active_engagment, draft_competition, draft_squares, draft_flash, draft_bracket_competition);
112
115
 
@@ -116,6 +116,78 @@ export const FlashMarketHelpers = {
116
116
  if(!parimutuel_odds){ return 0 }
117
117
  return stake / parimutuel_odds
118
118
  },
119
+ updatePollOptionProbability: (
120
+ changingOptionId: string,
121
+ newProbability: number,
122
+ allOptions: PollOptionProps[]
123
+ ): PollOptionProps[] => {
124
+ const total = 1;
125
+ const minProb = 0.001; // minimum probability for unlocked options
126
+
127
+ // Clone and update changing option
128
+ const updatedOptions = allOptions.map(o =>
129
+ o.poll_option_id === changingOptionId
130
+ ? { ...o, initial_odds: newProbability }
131
+ : { ...o }
132
+ );
133
+
134
+ const lockedOptions = updatedOptions.filter(o => o.probability_locked);
135
+ const unlockedOptions = updatedOptions.filter(
136
+ o => !o.probability_locked && o.poll_option_id !== changingOptionId
137
+ );
138
+
139
+ const lockedSum = lockedOptions.reduce(
140
+ (sum, o) => sum + (o.initial_odds ?? 0),
141
+ 0
142
+ );
143
+
144
+ const changedOption = updatedOptions.find(o => o.poll_option_id === changingOptionId);
145
+ if (!changedOption) return updatedOptions;
146
+
147
+ const oldProb = changedOption.initial_odds ?? 0;
148
+ //const delta = newProbability - oldProb; // positive if increasing, negative if decreasing
149
+
150
+ // Calculate the maximum allowed increase for the changing option
151
+ const maxForChanged = total - lockedSum - unlockedOptions.length * minProb;
152
+ changedOption.initial_odds = Math.min(Math.max(minProb, newProbability), maxForChanged);
153
+
154
+ const adjustedDelta = changedOption.initial_odds - oldProb;
155
+
156
+ // Remaining probability to redistribute among unlocked options
157
+ let remaining = total - lockedSum - changedOption.initial_odds;
158
+
159
+ if (unlockedOptions.length === 0) return updatedOptions;
160
+
161
+ // Redistribute probabilities
162
+ const finalOptions = updatedOptions.map(o => {
163
+ if (o.probability_locked || o.poll_option_id === changingOptionId) return o;
164
+
165
+ if (adjustedDelta < 0) {
166
+ // Changing option decreased → distribute evenly to others
167
+ const evenly = remaining / unlockedOptions.length;
168
+ return { ...o, initial_odds: Math.max(minProb, evenly) };
169
+ } else {
170
+ // Changing option increased → reduce proportionally
171
+ const sumUnlocked = unlockedOptions.reduce((sum, u) => sum + (u.initial_odds ?? 0), 0);
172
+ const proportion = (o.initial_odds ?? 0) / sumUnlocked;
173
+ const newOdds = Math.max(minProb, proportion * remaining);
174
+ return { ...o, initial_odds: newOdds };
175
+ }
176
+ });
177
+
178
+ // Fix rounding errors
179
+ const currentSum = finalOptions.reduce((sum, o) => sum + (o.initial_odds ?? 0), 0);
180
+ const roundingError = total - currentSum;
181
+
182
+ if (roundingError !== 0) {
183
+ const target = finalOptions.find(o => !o.probability_locked && o.poll_option_id !== changingOptionId);
184
+ if (target) {
185
+ target.initial_odds = Math.max(minProb, (target.initial_odds ?? 0) + roundingError);
186
+ }
187
+ }
188
+
189
+ return finalOptions;
190
+ },
119
191
  isNewValid: (options:PollOptionProps[], summaries:PollSummaryProps[], poll?:PollProps) => {
120
192
  let errors:string[] = []
121
193
  if(!poll){ return ['Waiting for market'] }
@@ -181,6 +181,15 @@ const ManageFlashMarket = ({ float, header_style, player, onClose, poll_id, onFo
181
181
  }
182
182
 
183
183
  const handleChangeProbability = (option:PollOptionProps, probability:number) => {
184
+
185
+ const final_options = FlashMarketHelpers.updatePollOptionProbability(option.poll_option_id, probability, [ ...real_options ]);
186
+ setFlashState({
187
+ ...flash_state,
188
+ probability_changed: true,
189
+ poll_options: poll_options.filter(po => !final_options.find(fo => fo.poll_option_id == po.poll_option_id)).concat(final_options)
190
+ });
191
+
192
+ /*
184
193
  if(option.probability_locked){ return }
185
194
  if(probability < 0){ return }
186
195
  if(probability > 1){ return }
@@ -249,6 +258,7 @@ const ManageFlashMarket = ({ float, header_style, player, onClose, poll_id, onFo
249
258
  probability_changed: true,
250
259
  poll_options: poll_options.filter(po => !final_options.find(fo => fo.poll_option_id == po.poll_option_id)).concat(final_options)
251
260
  });
261
+ */
252
262
  }
253
263
 
254
264
  const renderOptions = (data:{ item:PollOptionProps, index:number }) => {
@@ -605,7 +615,7 @@ const ManageFlashMarket = ({ float, header_style, player, onClose, poll_id, onFo
605
615
  if(responses < 0){ responses = 0 }
606
616
  let participants = players.length
607
617
  let winnings = poll_summaries.reduce((a,b) => a + b.winnings, 0);
608
- let revenue = staked - winnings
618
+ let revenue = poll.status == 'closed' ? staked - winnings : 0
609
619
  return (
610
620
  <View transparent>
611
621
  <View transparent type='row' style={{ padding:20, borderBottomWidth:1, borderColor:Colors.borders.light }}>
@@ -744,10 +754,26 @@ const ManageFlashMarket = ({ float, header_style, player, onClose, poll_id, onFo
744
754
  const base_stake_changed = settings_edit_allowed && poll?.base_stake != parseFloat(base_stake) ? true : false
745
755
  return (
746
756
  <View transparent>
757
+ {player?.role == 'admin' ?
758
+ <View transparent type='row' style={{ padding:20, borderBottomWidth:1, borderColor:Colors.borders.light }}>
759
+ <Icons.FlameIcon size={16} color={Colors.text.error} />
760
+ <View transparent style={{ flex:1, marginRight:10, marginLeft:10 }}>
761
+ <Text theme='h1'>Flash Market (ADMIN ONLY)</Text>
762
+ <Text theme='description' style={{ marginTop:3 }}>Flash this market to the front page of BettorEdge</Text>
763
+ </View>
764
+ <Switch
765
+ switch_type='on_off'
766
+ value={draft_poll.flash_active ?? false}
767
+ onChange={async(val) => {
768
+ updatePoll({ ...draft_poll, flash_active: val })
769
+ }}
770
+ />
771
+ </View>
772
+ :<></>}
747
773
  {player?.role == 'admin' ?
748
774
  <View type='row' style={{ padding:20, borderBottomWidth:1, borderColor:Colors.borders.light }}>
749
775
  <View transparent style={{ flex:1, marginRight:10 }}>
750
- <Text theme='h1'>Base Stake</Text>
776
+ <Text theme='h1'>Base Stake (ADMIN ONLY)</Text>
751
777
  <Text theme='description' style={{ marginTop:3 }}>Fill responses with a base stake based on their probabilities.</Text>
752
778
  </View>
753
779
  <TextInput
@@ -34,8 +34,10 @@ type FlashMarketProps = {
34
34
  onFocusPosition?: (position:{ x:number, y:number, width:number, height:number }) => void,
35
35
  onRequestAuthenticate: () => void
36
36
  }
37
+ const MIN_OPTION_WIDTH = 300
37
38
  const FlashMarket = ({ loading, poll, hide_footer, hide_timer, wrap_options, poll_options, poll_summaries, poll_campaign, flash_market_fees, hide_image, init_expanded, card_style, header_style, footer_style, onReload, location, player, player_id, onManageFlash, onRequestAuthenticate, onFocusPosition, onRequestLocation }:FlashMarketProps) => {
38
39
  const Colors = useColors();
40
+ const [ size, setSize ] = useState({ width:0, height:0 });
39
41
  const [ admin_action, setAdminActions ] = useState<{
40
42
  selected_option_id?:string,
41
43
  admin_loading:boolean
@@ -66,7 +68,9 @@ const FlashMarket = ({ loading, poll, hide_footer, hide_timer, wrap_options, pol
66
68
  const potential_winnings = FlashMarketHelpers.calcPotentialWinnings(selected_option?.parimutuel_odds, draft_stake.toFixed(2));
67
69
  const order_valid = FlashMarketHelpers.isValid(my_responses, poll, draft_data.stake, selected_option?.poll_option_id);
68
70
  const visible_options = poll_options.filter(po => po.status != 'inactive').sort((a,b) => a.priority - b.priority)
71
+ const num_options_per_row = Math.floor((size.width-20) / MIN_OPTION_WIDTH)
69
72
 
73
+ const option_width = ((size.width-20) / num_options_per_row) - (4*num_options_per_row)
70
74
  const is_inactive = poll && ['pending','paused'].includes(poll?.status) ? true : false
71
75
  const is_upcoming = poll && poll.start_datetime && moment().isBefore(moment(poll.start_datetime)) ? true : false
72
76
  const is_admin = player?.role == 'admin' ? true : poll?.admins && poll.admins.includes(player?.player_id ?? '0') ? true : false
@@ -208,7 +212,9 @@ const FlashMarket = ({ loading, poll, hide_footer, hide_timer, wrap_options, pol
208
212
  const selected = selected_option?.poll_option_id == data.item.poll_option_id ? true : false
209
213
  const admin_checked = selected_option_id == data.item.poll_option_id ? true : false
210
214
  return (
211
- <View key={data.item.poll_option_id.toString()} transparent style={{ margin:wrap_options?2:undefined, borderRadius:8, minWidth:wrap_options?300:undefined, flexDirection:'row', alignItems:'center', borderWidth:my_option?1:0, borderColor:Colors.text.action, padding:10, flexGrow:wrap_options?1:0 }}>
215
+ <View float style={{ width:option_width, margin:2, borderRadius:8,borderWidth:my_option?1:0, borderColor:Colors.text.action, padding:10 }}>
216
+
217
+ <View transparent key={data.item.poll_option_id.toString()} style={{ flexDirection:'row', alignItems:'center' }}>
212
218
  {!selected && poll?.status != 'closed' && is_admin ?
213
219
  <Checkbox
214
220
  style={{ marginRight:5 }}
@@ -244,29 +250,10 @@ const FlashMarket = ({ loading, poll, hide_footer, hide_timer, wrap_options, pol
244
250
  <Text theme='h2'>{((data.item.parimutuel_odds ?? 0)*100).toFixed(2)}%</Text>
245
251
  <Text theme='description' style={{ marginTop:3 }}>{MarketComponentHelpers.getOddsLabel(MarketComponentHelpers.calcAmericanOddsFromProbability(data.item.parimutuel_odds ?? 0))}</Text>
246
252
  </View>
247
- {my_option?.result_ind ?
248
- <Text style={{ marginTop:3 }} theme='h2' color={getColor(response_stats.earnings)}>{cl}{response_stats.earnings.toFixed(2)} Earned</Text>
249
- : my_option ?
250
- <Text style={{ marginTop:3 }} theme='h2' color={Colors.text.h1}>{cl}{response_stats.stake.toFixed(2)} to win {cl}{response_stats.potential_winnings.toFixed(2)}*</Text>
251
- :<></>}
252
253
  </View>
253
254
  :<></>}
254
255
  {selected ?
255
- <View transparent style={{ flexDirection:'row' }}>
256
- <TextInput
257
- onFocusPosition={onFocusPosition}
258
- onChangeText={(text) => setDraftData({ ...draft_data, stake: text })}
259
- style={{ width: 75, textAlign:'center', padding:10 }}
260
- value={draft_data.stake}
261
- />
262
- <Button
263
- type='success'
264
- disabled={!order_valid || action_loading}
265
- loading={action_loading}
266
- style={{ padding:10, marginLeft:10, opacity:order_valid && !action_loading?1:0.5 }}
267
- title='SUBMIT'
268
- onPress={() => handleSubmit(data.item)}
269
- />
256
+ <View transparent>
270
257
  <Button
271
258
  title='X'
272
259
  style={{ padding:10, marginLeft:10 }}
@@ -284,7 +271,7 @@ const FlashMarket = ({ loading, poll, hide_footer, hide_timer, wrap_options, pol
284
271
  style={{ padding:10 }}
285
272
  onPress={() => setSelectedOption(data.item)}
286
273
  >
287
- <Text theme='h1' color={Colors.text.white}>{my_option ? 'ADD' : 'BUY'}</Text>
274
+ <Text theme='h2' color={Colors.text.white}>{my_option ? 'ADD' : 'BUY'}</Text>
288
275
  </Button>
289
276
  :<></>}
290
277
  </View>
@@ -295,6 +282,31 @@ const FlashMarket = ({ loading, poll, hide_footer, hide_timer, wrap_options, pol
295
282
  </View>
296
283
  :<></>}
297
284
  </View>
285
+ {selected ?
286
+ <View transparent style={{ flexDirection:'row', alignItems:'center', marginTop:10 }}>
287
+ <TextInput
288
+ onFocusPosition={onFocusPosition}
289
+ onChangeText={(text) => setDraftData({ ...draft_data, stake: text })}
290
+ style={{ flex:1, textAlign:'center', padding:10 }}
291
+ value={draft_data.stake}
292
+ />
293
+ <Button
294
+ type='success'
295
+ disabled={!order_valid || action_loading}
296
+ loading={action_loading}
297
+ style={{ padding:10, marginLeft:10, opacity:order_valid && !action_loading?1:0.5 }}
298
+ title='SUBMIT'
299
+ onPress={() => handleSubmit(data.item)}
300
+ />
301
+ </View>
302
+ :my_option?.result_ind ?
303
+ <Text style={{ marginTop:3 }} theme='h2' color={getColor(response_stats.earnings)}>{cl}{response_stats.earnings.toFixed(2)} Earned</Text>
304
+ :my_option ?
305
+ <Text style={{ marginTop:3 }} theme='h2' color={Colors.text.action}>{cl}{response_stats.stake.toFixed(2)} to win {cl}{response_stats.potential_winnings.toFixed(2)}*</Text>
306
+ :<></>
307
+ }
308
+
309
+ </View>
298
310
  )
299
311
  }
300
312
 
@@ -302,7 +314,10 @@ const FlashMarket = ({ loading, poll, hide_footer, hide_timer, wrap_options, pol
302
314
  //if(!poll.flash_active){ return <></> }
303
315
  const stats = FlashMarketHelpers.getStats(poll_summaries, flash_market_fees);
304
316
  return (
305
- <View transparent style={{ ...card_style }}>
317
+ <View transparent style={{ ...card_style }} onLayout={(ev) => {
318
+ const { width, height } = ev.nativeEvent.layout;
319
+ setSize({ width, height });
320
+ }}>
306
321
  <Button
307
322
  style={{ backgroundColor:Colors.views.header, padding:10, flexDirection:'row', alignItems:'center', ...header_style }}
308
323
  onPress={() => setExpanded(!expanded)}>
@@ -344,7 +359,7 @@ const FlashMarket = ({ loading, poll, hide_footer, hide_timer, wrap_options, pol
344
359
  />
345
360
  :<></>}
346
361
  {wrap_options ?
347
- <View style={{ flexDirection:'row', flexWrap:'wrap' }}>
362
+ <View style={{ flexDirection:'row', flexWrap:'wrap', justifyContent:'center' }}>
348
363
  {visible_options.map((o,i) => {
349
364
  return renderOptions({ item:o,index:i })
350
365
  })}