be-components 1.2.2 → 1.2.4

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 (65) hide show
  1. package/lib/commonjs/Competition/components/CompetitionInfoCard.js +225 -199
  2. package/lib/commonjs/Competition/components/CompetitionInfoCard.js.map +1 -1
  3. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js +80 -32
  4. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js.map +1 -1
  5. package/lib/commonjs/Competition/components/CompetitionPlay.js +126 -837
  6. package/lib/commonjs/Competition/components/CompetitionPlay.js.map +1 -1
  7. package/lib/commonjs/Competition/components/LeaderPicks.js +2 -0
  8. package/lib/commonjs/Competition/components/LeaderPicks.js.map +1 -1
  9. package/lib/commonjs/Competition/index.js +590 -16
  10. package/lib/commonjs/Competition/index.js.map +1 -1
  11. package/lib/commonjs/Components/Icons.js +64 -0
  12. package/lib/commonjs/Components/Icons.js.map +1 -1
  13. package/lib/commonjs/PromotedOrder/api/index.js +67 -0
  14. package/lib/commonjs/PromotedOrder/api/index.js.map +1 -0
  15. package/lib/commonjs/PromotedOrder/index.js +61 -0
  16. package/lib/commonjs/PromotedOrder/index.js.map +1 -0
  17. package/lib/commonjs/index.js +7 -0
  18. package/lib/commonjs/index.js.map +1 -1
  19. package/lib/module/Competition/components/CompetitionInfoCard.js +225 -201
  20. package/lib/module/Competition/components/CompetitionInfoCard.js.map +1 -1
  21. package/lib/module/Competition/components/CompetitionLeaderboard.js +81 -33
  22. package/lib/module/Competition/components/CompetitionLeaderboard.js.map +1 -1
  23. package/lib/module/Competition/components/CompetitionPlay.js +127 -838
  24. package/lib/module/Competition/components/CompetitionPlay.js.map +1 -1
  25. package/lib/module/Competition/components/LeaderPicks.js +2 -0
  26. package/lib/module/Competition/components/LeaderPicks.js.map +1 -1
  27. package/lib/module/Competition/index.js +592 -18
  28. package/lib/module/Competition/index.js.map +1 -1
  29. package/lib/module/Components/Icons.js +64 -0
  30. package/lib/module/Components/Icons.js.map +1 -1
  31. package/lib/module/PromotedOrder/api/index.js +61 -0
  32. package/lib/module/PromotedOrder/api/index.js.map +1 -0
  33. package/lib/module/PromotedOrder/index.js +52 -0
  34. package/lib/module/PromotedOrder/index.js.map +1 -0
  35. package/lib/module/index.js +2 -1
  36. package/lib/module/index.js.map +1 -1
  37. package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts +4 -8
  38. package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts.map +1 -1
  39. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts +3 -1
  40. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts.map +1 -1
  41. package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts +18 -4
  42. package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts.map +1 -1
  43. package/lib/typescript/src/Competition/components/LeaderPicks.d.ts +2 -1
  44. package/lib/typescript/src/Competition/components/LeaderPicks.d.ts.map +1 -1
  45. package/lib/typescript/src/Competition/index.d.ts +4 -2
  46. package/lib/typescript/src/Competition/index.d.ts.map +1 -1
  47. package/lib/typescript/src/Components/Icons.d.ts +2 -0
  48. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  49. package/lib/typescript/src/PromotedOrder/api/index.d.ts +13 -0
  50. package/lib/typescript/src/PromotedOrder/api/index.d.ts.map +1 -0
  51. package/lib/typescript/src/PromotedOrder/index.d.ts +17 -0
  52. package/lib/typescript/src/PromotedOrder/index.d.ts.map +1 -0
  53. package/lib/typescript/src/index.d.ts +2 -1
  54. package/lib/typescript/src/index.d.ts.map +1 -1
  55. package/package.json +1 -1
  56. package/src/Competition/components/CompetitionInfoCard.tsx +92 -36
  57. package/src/Competition/components/CompetitionLeaderboard.tsx +57 -29
  58. package/src/Competition/components/CompetitionPlay.tsx +71 -677
  59. package/src/Competition/components/LeaderPicks.tsx +3 -2
  60. package/src/Competition/index.tsx +516 -19
  61. package/src/Components/Icons.tsx +35 -0
  62. package/src/PromotedOrder/api/index.ts +43 -0
  63. package/src/PromotedOrder/index.tsx +55 -0
  64. package/src/index.tsx +3 -2
  65. package/src/types.d.ts +34 -1
@@ -1,20 +1,34 @@
1
1
  import React from 'react';
2
- import type { CompanyProps } from "../../types";
2
+ import type { AthleteProps, CompetitionMatchMarketProps, CompetitionMatchProps, CompetitionPlayerProps, CompetitionProps, CompetitionTypeProps, LeagueProps, MarketProps, PlayerPickProps } from "../../types";
3
+ import type { EventProps, MatchProps, TournamentProps } from "../../types";
3
4
  import type { BEEventProps } from "../../Observer/api/types";
4
5
  type CompetitionPlayProps = {
5
6
  player_id?: string;
6
- competition_id: string;
7
- company?: CompanyProps;
7
+ authenticated_competition_player?: CompetitionPlayerProps;
8
+ competition: CompetitionProps;
9
+ competition_type: CompetitionTypeProps;
10
+ competition_players: CompetitionPlayerProps[];
11
+ competition_matches: CompetitionMatchProps[];
12
+ competition_match_markets: CompetitionMatchMarketProps[];
13
+ leagues: LeagueProps[];
14
+ athletes: AthleteProps[];
15
+ events: EventProps[];
16
+ tournaments: TournamentProps[];
17
+ matches: MatchProps[];
18
+ markets: MarketProps[];
19
+ player_picks: PlayerPickProps[];
8
20
  onEvent?: (event: BEEventProps) => void;
9
21
  height: number;
10
22
  width: number;
23
+ pick_loading?: string;
11
24
  source?: string;
25
+ onPick: (pp: PlayerPickProps, event_title: string, event_start: string) => void;
12
26
  onGoBack?: () => void;
13
27
  hide_player?: boolean;
14
28
  onRequestAuthentication: () => void;
15
29
  back_allowed?: boolean;
16
30
  onChangeCompetition?: (competition_id: string) => void;
17
31
  };
18
- declare const CompetitionPlay: ({ player_id, company, source, back_allowed, onGoBack, competition_id, width, height, hide_player, onChangeCompetition, onRequestAuthentication }: CompetitionPlayProps) => React.JSX.Element;
32
+ declare const CompetitionPlay: ({ authenticated_competition_player, pick_loading, competition, competition_type, onPick, competition_matches, competition_match_markets, leagues, athletes, events, tournaments, matches, markets, player_id, player_picks }: CompetitionPlayProps) => React.JSX.Element;
19
33
  export default CompetitionPlay;
20
34
  //# sourceMappingURL=CompetitionPlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CompetitionPlay.d.ts","sourceRoot":"","sources":["../../../../../src/Competition/components/CompetitionPlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAkC,YAAY,EAAsW,MAAM,aAAa,CAAC;AAwBpb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,KAAK,oBAAoB,GAAG;IACxB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,cAAc,EAAC,MAAM,CAAC;IACtB,OAAO,CAAC,EAAC,YAAY,CAAC;IACtB,OAAO,CAAC,EAAC,CAAC,KAAK,EAAC,YAAY,KAAK,IAAI,CAAC;IACtC,MAAM,EAAC,MAAM,CAAC;IACd,KAAK,EAAC,MAAM,CAAC;IACb,MAAM,CAAC,EAAC,MAAM,CAAC;IACf,QAAQ,CAAC,EAAC,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAC,OAAO,CAAC;IACrB,uBAAuB,EAAE,MAAM,IAAI,CAAC;IACpC,YAAY,CAAC,EAAC,OAAO,CAAA;IACrB,mBAAmB,CAAC,EAAE,CAAC,cAAc,EAAC,MAAM,KAAK,IAAI,CAAA;CACxD,CAAA;AACD,QAAA,MAAM,eAAe,qJAAsJ,oBAAoB,sBA43B9L,CAAA;AAED,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"CompetitionPlay.d.ts","sourceRoot":"","sources":["../../../../../src/Competition/components/CompetitionPlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAM/M,OAAO,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M,eAAe,iOAAkO,oBAAoB,sBA4R1Q,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -4,6 +4,7 @@ type LeaderPicksProps = {
4
4
  competition: CompetitionProps;
5
5
  markets: MarketProps[];
6
6
  events: EventProps[];
7
+ width: number;
7
8
  matches: MatchProps[];
8
9
  tournaments: TournamentProps[];
9
10
  athletes: AthleteProps[];
@@ -17,6 +18,6 @@ type LeaderPicksProps = {
17
18
  onPrevious?: () => void;
18
19
  onClose: () => void;
19
20
  };
20
- declare const LeaderPicks: ({ markets, events, matches, athletes, competition, competition_type, competition_matches, competition_match_markets, leader, height, onClose, onNext, onPrevious }: LeaderPicksProps) => React.JSX.Element;
21
+ declare const LeaderPicks: ({ markets, events, matches, athletes, competition, competition_type, competition_matches, competition_match_markets, leader, height, width, onClose, onNext, onPrevious }: LeaderPicksProps) => React.JSX.Element;
21
22
  export default LeaderPicks;
22
23
  //# sourceMappingURL=LeaderPicks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LeaderPicks.d.ts","sourceRoot":"","sources":["../../../../../src/Competition/components/LeaderPicks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAMlD,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,gBAAgB,EAAkD,oBAAoB,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAmB,iBAAiB,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAMhS,KAAK,gBAAgB,GAAG;IACpB,WAAW,EAAC,gBAAgB,CAAC;IAC7B,OAAO,EAAC,WAAW,EAAE,CAAC;IACtB,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,OAAO,EAAC,UAAU,EAAE,CAAC;IACrB,WAAW,EAAC,eAAe,EAAE,CAAC;IAC9B,QAAQ,EAAC,YAAY,EAAE,CAAC;IACxB,KAAK,EAAC,SAAS,EAAE,CAAC;IAClB,gBAAgB,EAAC,oB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,CAAC,EAAC,MAAM,IAAI,CAAC;IACvB,OAAO,EAAC,MAAM,IAAI,CAAA;CACrB,CAAA;AACD,QAAA,MAAM,WAAW,8KAA8K,gBAAgB,sBAsL9M,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  import type { BEEventProps } from '../Observer/api/types';
3
+ import type { CompetitionProps } from '../types';
3
4
  type CompetitionModuleProps = {
4
5
  player_id?: string;
5
6
  competition_id: string;
6
7
  onEvent?: (event: BEEventProps) => void;
7
- onRequestAuthentication: () => void;
8
+ onRequestAuthentication: (auth_strategy_id?: string) => void;
9
+ onShareCompetition: (competition: CompetitionProps) => void;
8
10
  };
9
- declare const CompetitionModule: ({ competition_id, player_id, onEvent, onRequestAuthentication }: CompetitionModuleProps) => React.JSX.Element | undefined;
11
+ declare const CompetitionModule: ({ competition_id, player_id, onRequestAuthentication, onShareCompetition }: CompetitionModuleProps) => React.JSX.Element;
10
12
  export default CompetitionModule;
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Competition/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,KAAK,sBAAsB,GAAG;IAC1B,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,cAAc,EAAC,MAAM,CAAC;IACtB,OAAO,CAAC,EAAC,CAAC,KAAK,EAAC,YAAY,KAAK,IAAI,CAAC;IACtC,uBAAuB,EAAC,MAAM,IAAI,CAAA;CACrC,CAAA;AAED,QAAA,MAAM,iBAAiB,oEAAoE,sBAAsB,kCAoBhH,CAAA;AAED,eAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Competition/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,OAAO,KAAK,EAA0I,gBAAgB,EAAqR,MAAM,UAAU,CAAC;AAU5c,KAAK,sBAAsB,GAAG;IAC1B,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,cAAc,EAAC,MAAM,CAAC;IACtB,OAAO,CAAC,EAAC,CAAC,KAAK,EAAC,YAAY,KAAK,IAAI,CAAC;IACtC,uBAAuB,EAAC,CAAC,gBAAgB,CAAC,EAAC,MAAM,KAAK,IAAI,CAAC;IAC3D,kBAAkB,EAAC,CAAC,WAAW,EAAC,gBAAgB,KAAK,IAAI,CAAA;CAC5D,CAAA;AAED,QAAA,MAAM,iBAAiB,+EAA+E,sBAAsB,sBAyf3H,CAAA;AAED,eAAe,iBAAiB,CAAA"}
@@ -25,11 +25,13 @@ declare const _default: {
25
25
  OwnedSquareIcon: ({ color, size }: IconProps) => React.JSX.Element;
26
26
  InProgressIcon: ({ color, size }: IconProps) => React.JSX.Element;
27
27
  LockClosedIcon: ({ color, size }: IconProps) => React.JSX.Element;
28
+ SelectorIcon: ({ color, size }: IconProps) => React.JSX.Element;
28
29
  CloseIcon: ({ color, size }: IconProps) => React.JSX.Element;
29
30
  BettorEdgeIcon: ({ color, size }: IconProps) => React.JSX.Element;
30
31
  BirthdayIcon: ({ color, size }: IconProps) => React.JSX.Element;
31
32
  CheckIcon: ({ color, size }: IconProps) => React.JSX.Element;
32
33
  LogoutIcon: ({ color, size }: IconProps) => React.JSX.Element;
34
+ PodiumIcon: ({ color, size, secondary_color }: IconProps) => React.JSX.Element;
33
35
  ImageIcon: ({ color, size }: IconProps) => React.JSX.Element;
34
36
  MenuIcon: ({ color }: IconProps) => React.JSX.Element;
35
37
  MoreIcon: ({ color, direction, size }: IconProps) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Icons.d.ts","sourceRoot":"","sources":["../../../../src/Components/Icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,SAAS,GAAG;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAC,MAAM,CAAC;IACxB,IAAI,CAAC,EAAC,MAAM,CAAC;IACb,SAAS,CAAC,EAAC,IAAI,GAAC,MAAM,GAAC,MAAM,GAAC,OAAO,CAAA;CACxC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqkCD,wBAyDC"}
1
+ {"version":3,"file":"Icons.d.ts","sourceRoot":"","sources":["../../../../src/Components/Icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,SAAS,GAAG;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAC,MAAM,CAAC;IACxB,IAAI,CAAC,EAAC,MAAM,CAAC;IACb,SAAS,CAAC,EAAC,IAAI,GAAC,MAAM,GAAC,MAAM,GAAC,OAAO,CAAA;CACxC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsmCD,wBA2DC"}
@@ -0,0 +1,13 @@
1
+ import type { BestAvailableOrderProps, EventProps, MatchProps, PublicPlayerProps, TournamentProps } from "../../types";
2
+ export { PromotedOrderApi, PromotedOrderHelpers };
3
+ declare const PromotedOrderApi: {
4
+ setEnvironment: () => void;
5
+ getPlayersByPlayerIds: (player_ids: string[]) => Promise<PublicPlayerProps[]>;
6
+ };
7
+ declare const PromotedOrderHelpers: {
8
+ getContestDetails: (order: BestAvailableOrderProps, event?: EventProps, tournament?: TournamentProps, match?: MatchProps) => {
9
+ contest_title: string;
10
+ contest_time_detail: string;
11
+ };
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/PromotedOrder/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAItH,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,CAAA;AAGjD,QAAA,MAAM,gBAAgB;;wCAKuB,MAAM,EAAE,KAAE,QAAQ,iBAAiB,EAAE,CAAC;CAKlF,CAAA;AAGD,QAAA,MAAM,oBAAoB;+BACI,uBAAuB,UAAS,UAAU,eAAc,eAAe,UAAS,UAAU,KAAE;QAAE,aAAa,EAAC,MAAM,CAAC;QAAC,mBAAmB,EAAC,MAAM,CAAA;KAAE;CAmB7K,CAAA"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { BestAvailableOrderProps, EventProps, MarketProps, MatchProps, TournamentProps } from "../types";
3
+ type PromotedOrderProps = {
4
+ player_id?: string;
5
+ order: BestAvailableOrderProps;
6
+ market: MarketProps;
7
+ event?: EventProps;
8
+ tournament?: TournamentProps;
9
+ match?: MatchProps;
10
+ onShareOrder: (order: BestAvailableOrderProps) => void;
11
+ onViewMarket: (order: BestAvailableOrderProps) => void;
12
+ onBuyOrder: (order: BestAvailableOrderProps) => void;
13
+ onRejectOrder: (order: BestAvailableOrderProps) => void;
14
+ };
15
+ declare const PromotedOrder: ({ order, player_id, event, tournament, match }: PromotedOrderProps) => React.JSX.Element;
16
+ export default PromotedOrder;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/PromotedOrder/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAqB,eAAe,EAAE,MAAM,UAAU,CAAC;AAKjI,KAAK,kBAAkB,GAAG;IACtB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,KAAK,EAAC,uBAAuB,CAAC;IAC9B,MAAM,EAAC,WAAW,CAAC;IACnB,KAAK,CAAC,EAAC,UAAU,CAAC;IAClB,UAAU,CAAC,EAAC,eAAe,CAAC;IAC5B,KAAK,CAAC,EAAC,UAAU,CAAC;IAClB,YAAY,EAAC,CAAC,KAAK,EAAC,uBAAuB,KAAK,IAAI,CAAC;IACrD,YAAY,EAAE,CAAC,KAAK,EAAC,uBAAuB,KAAK,IAAI,CAAC;IACtD,UAAU,EAAC,CAAC,KAAK,EAAC,uBAAuB,KAAK,IAAI,CAAC;IACnD,aAAa,EAAC,CAAC,KAAK,EAAC,uBAAuB,KAAK,IAAI,CAAA;CACxD,CAAA;AAED,QAAA,MAAM,aAAa,mDAAmD,kBAAkB,sBAgCvF,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -17,5 +17,6 @@ import AdServer, { AdProvider } from "./AdServer";
17
17
  import BracketRoom from "./Bracket";
18
18
  import SocketManager from './Socket';
19
19
  import SquaresModule from "./Squares";
20
- export { Authenticator, Observer, BEEventApi, BELinkApi, ProfileManager, Components, SocialComponents, APIOverrides, LinearGradient, usePlayerLocation, BettorSearch, Colors, MyWallet, Checkout, PollCampaign, PollCampaignApi, PollApi, CompetitionModule, AdServer, AdProvider, BracketRoom, SquaresModule, SocketManager };
20
+ import PromotedOrder from "./PromotedOrder";
21
+ export { Authenticator, Observer, BEEventApi, BELinkApi, ProfileManager, Components, SocialComponents, APIOverrides, LinearGradient, usePlayerLocation, BettorSearch, Colors, MyWallet, Checkout, PollCampaign, PollCampaignApi, PollApi, CompetitionModule, AdServer, AdProvider, BracketRoom, SquaresModule, SocketManager, PromotedOrder };
21
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,cAAc,MAAM,kBAAkB,CAAC;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AAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,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;AAE5C,OAAO,EACL,aAAa,EACb,QAAQ,EACR,UAAU,EACV,SAAS,EACT,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,QAAQ,EACR,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACd,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "be-components",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "Components for BettorEdge Apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -1,46 +1,21 @@
1
- import React from 'react';
2
- import { Image, TouchableOpacity, View } from "react-native"
3
- import type { CompetitionProps, CompetitionTypeProps, MyPlayerProps } from "../../types"
4
- import moment from 'moment-mini';
5
- import { Button, Icons, Text } from '../../Components';
6
- import { CompetitionApi, CompetitionHelpers } from '../api';
1
+ import React, { useState } from 'react';
2
+ import { TouchableOpacity, View, Image, FlatList } from "react-native"
3
+ import type { CompetitionPayoutTypeProps, CompetitionProps, CompetitionResultTypeProps, CompetitionTypeProps, MyPlayerProps } from "../../types"
4
+ import { Icons, Text } from '../../Components';
7
5
  import Colors from '../../constants/colors';
8
- import { BELinkApi } from '../../Observer';
6
+ import { view_styles } from '../../constants/styles';
7
+ import { CompetitionHelpers } from '../api';
9
8
 
10
9
  type CompetitionInfoCardProps = {
11
10
  competition:CompetitionProps,
12
11
  competition_type:CompetitionTypeProps,
13
- onViewEvents: () => void,
12
+ competition_result_type:CompetitionResultTypeProps,
13
+ competition_payouts:CompetitionPayoutTypeProps[],
14
14
  player?:MyPlayerProps,
15
- onEnter: (competition_id:string) => void,
16
- onLeave:() => void,
17
- onViewPrize?:() => void,
18
- onViewRules: () => void,
19
- can_leave?:boolean
20
15
  }
21
- const CompetitionInfoCard = ({ player, competition, competition_type, onViewEvents, onEnter, onLeave, can_leave, onViewRules }:CompetitionInfoCardProps) => {
22
-
23
-
24
-
25
- const handleShare = async() => {
26
- let redirect_url = `https://app.bettoredge.com/competition/play/${competition.competition_id}`
27
- if(player){
28
- const { player_referral } = await CompetitionApi.getMyReferralCode()
29
- redirect_url += `?refer=${player_referral.referral_code}`
30
- }
31
- const { url } = await BELinkApi.generateShortLink({
32
- generator:'player',
33
- link_type: 'user_generated_link',
34
- link_sub_type:'competition_link',
35
- type_id: competition.competition_id,
36
- status: 'active',
37
- redirect_url
38
- })
39
- BELinkApi.share(competition.competition_name, undefined, url)
40
- }
41
-
42
-
43
- const can_enter = moment().isBefore(moment(competition.scheduled_datetime))
16
+ const CompetitionInfoCard = ({ competition, competition_type, competition_result_type, competition_payouts }:CompetitionInfoCardProps) => {
17
+ const [ expanded, setExpanded ] = useState(false);
18
+
44
19
  const cl = competition.market_type == 'FOR_MONEY' ? '$' : 'E'
45
20
 
46
21
  let potential_winnings = competition.ticket_revenue
@@ -51,6 +26,86 @@ const CompetitionInfoCard = ({ player, competition, competition_type, onViewEven
51
26
  if(potential_winnings < competition.guaranteed_payout){ potential_winnings = competition.guaranteed_payout }
52
27
  }
53
28
 
29
+ const renderPayouts = (data: { item:CompetitionPayoutTypeProps, index:number }) => {
30
+ return (
31
+ <View style={{ ...view_styles.body_row, padding:8, borderBottomWidth:1, borderColor:Colors.shades.shade600 }}>
32
+ <Text style={{ flex:1 }} theme='header_2'>{CompetitionHelpers.formatPlace(data.item.tier)}{data.item.tier!= 1 ? ' Or Better': ''}</Text>
33
+ <Text theme='header_2'>Split {data.item.payout}%</Text>
34
+ </View>
35
+ )
36
+ }
37
+
38
+ return (
39
+ <View nativeID="competition_details" style={{ ...view_styles.section, minWidth:350 }}>
40
+ <TouchableOpacity style={view_styles.section_header} onPress={() => setExpanded(!expanded)}>
41
+ <Icons.SettingsIcon size={18} color={Colors.brand.midnight} />
42
+ <View style={{ flex:1, marginLeft:10 }}>
43
+ <Text theme="header">COMPETITION DETAILS</Text>
44
+ <Text style={{ marginTop: 4 }} theme="body_2">Detailed Information on this competition</Text>
45
+ </View>
46
+ <View style={{ margin:10 }}>
47
+ <Text color={Colors.utility.success} weight='bold'>{cl}{potential_winnings.toFixed(2)}</Text>
48
+ </View>
49
+ <Icons.ChevronIcon direction={expanded?'up':'down'} color={Colors.brand.midnight} size={8} />
50
+ </TouchableOpacity>
51
+ {expanded ?
52
+ <View style={{ ...view_styles.section_body }}>
53
+ <View style={view_styles.body_row}>
54
+ <Text style={{flex:1}} theme="body">Competition Type</Text>
55
+ <Text theme="header_2">{competition_type.type.toUpperCase()}</Text>
56
+ </View>
57
+ {competition_type.type == 'pick' ?
58
+ <View style={view_styles.body_row}>
59
+ <Text style={{flex:1}} theme="body">Max Pick Count</Text>
60
+ <Text theme="header_2">{competition.max_pick_count} Picks</Text>
61
+ </View>
62
+ :
63
+ <View style={view_styles.body_row}>
64
+ <Text style={{flex:1}} theme="body">Initial Balance</Text>
65
+ <Text theme="header_2">E{competition.initial_balance}</Text>
66
+ </View>
67
+ }
68
+ <View style={view_styles.body_row}>
69
+ <Text style={{flex:1}} theme="body">Current Payout</Text>
70
+ <Text theme="header_2">{cl}{potential_winnings.toFixed(2)}</Text>
71
+ </View>
72
+ {competition.prize_override ?
73
+ <View style={{ padding:10, borderRadius:8, backgroundColor:Colors.incentive.gold_faded }}>
74
+ <Text size={14} color={Colors.incentive.gold} weight='bold'>Additional Prize</Text>
75
+ <View style={view_styles.body_row}>
76
+ <Image
77
+ source={{ uri: competition.prize_image?.url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1649737862/be_logo_jte2ux.webp' }}
78
+ style={{ height:50, width:50, borderRadius:4 }}
79
+ resizeMode='cover'
80
+ />
81
+ <Text style={{ marginLeft:10 }} size={14} weight='bold' color={Colors.brand.midnight}>{competition.prize_override}</Text>
82
+ </View>
83
+ </View>
84
+ :<></>}
85
+ <View style={view_styles.body_row}>
86
+ <Text style={{flex:1}} theme="body">Entries</Text>
87
+ <Text theme="header_2">{competition.tickets_sold} / {competition.available_tickets}</Text>
88
+ </View>
89
+ <View style={view_styles.body_row}>
90
+ <Text style={{flex:1}} theme="body">Payout Type</Text>
91
+ <Text theme="header_2">{competition_result_type.label.toUpperCase()}</Text>
92
+ </View>
93
+ <View style={{ padding:10, borderRadius:8, backgroundColor:Colors.shades.shade100 }}>
94
+ <Text style={{ padding:5 }} theme="header_2">{competition_result_type.description}</Text>
95
+ <View style={{ padding:10 }}>
96
+ <FlatList
97
+ data={competition_payouts.sort((a,b) => b.tier - a.tier)}
98
+ renderItem={renderPayouts}
99
+ keyExtractor={(item) => item.competition_payout_type_id.toString()}
100
+ />
101
+ </View>
102
+ </View>
103
+ </View>
104
+ :<></>}
105
+ </View>
106
+ )
107
+
108
+ /*
54
109
  return (
55
110
  <View>
56
111
  <View nativeID="competition_info">
@@ -144,6 +199,7 @@ const CompetitionInfoCard = ({ player, competition, competition_type, onViewEven
144
199
  </View>
145
200
  </View>
146
201
  )
202
+ */
147
203
  }
148
204
 
149
205
  export default CompetitionInfoCard
@@ -1,22 +1,25 @@
1
1
  import React, { useEffect, useState } from "react"
2
2
  import { FlatList, Image, ScrollView, TouchableOpacity, View, ActivityIndicator } from "react-native"
3
3
  import type { CompetitionProps, CompetitionRecordProps, CompetitionResultProps, CompetitionTypeProps, PublicPlayerProps } from "../../types"
4
- import { CompetitionApi, CompetitionResultApi } from "../api"
4
+ import { CompetitionApi, CompetitionHelpers, CompetitionResultApi } from "../api"
5
5
  import { Button, Icons, Text } from "../../Components"
6
6
  import Colors from "../../constants/colors"
7
+ import { view_styles } from "../../constants/styles"
7
8
 
8
9
  type CompetitionLeaderboardProps = {
9
10
  competition:CompetitionProps,
10
11
  competition_type:CompetitionTypeProps,
11
12
  viewer_id?:string,
12
13
  height: number,
14
+ width:number,
13
15
  view_mode: 'short'|'full',
16
+ onClose?:() => void,
14
17
  onSeeFull: () => void,
15
18
  onLeaderSelect:(player:PublicPlayerProps) => void
16
19
  }
17
20
 
18
- const CompetitionLeaderboard = ({ competition, competition_type, height, viewer_id, view_mode, onSeeFull, onLeaderSelect }:CompetitionLeaderboardProps) => {
19
-
21
+ const CompetitionLeaderboard = ({ competition, competition_type, width, height, viewer_id, view_mode, onSeeFull, onClose, onLeaderSelect }:CompetitionLeaderboardProps) => {
22
+ const [ expanded, setExpanded ] = useState(false);
20
23
  const [ data, setData ] = useState<{
21
24
  loading:boolean,
22
25
  competition_results:CompetitionResultProps[],
@@ -31,8 +34,7 @@ const CompetitionLeaderboard = ({ competition, competition_type, height, viewer_
31
34
  offset:0
32
35
  })
33
36
 
34
- const { loading, competition_results, competition_records, players } = data
35
-
37
+ const { loading, competition_results, competition_records, players, offset } = data
36
38
  let results = [ ...competition_results ];
37
39
 
38
40
  if(view_mode == 'short'){ results = results.filter((r,i) => r ? i < 3 : i < 3) }
@@ -83,7 +85,7 @@ const CompetitionLeaderboard = ({ competition, competition_type, height, viewer_
83
85
  </View>
84
86
  :
85
87
  <View nativeID="place" style={{ padding:5 }}>
86
- <Text size={12} color={Colors.brand.midnight} weight="bold">{data.item.place}</Text>
88
+ <Text size={12} color={Colors.brand.midnight} weight="bold">{CompetitionHelpers.formatPlace(data.item.place)}</Text>
87
89
  </View>
88
90
  }
89
91
  <View nativeID="image" style={{ paddingLeft:10, paddingRight:10 }}>
@@ -107,18 +109,28 @@ const CompetitionLeaderboard = ({ competition, competition_type, height, viewer_
107
109
  </TouchableOpacity>
108
110
  )
109
111
  }
112
+
110
113
  return (
111
- <View style={{ flex:1, height, backgroundColor:Colors.shades.shade100 }}>
112
- {view_mode == 'full' && viewer_record && viewer_result && viewer ?
114
+ <View style={{ ...view_styles.section, margin:view_mode == 'full'?0:10, minWidth:350, height:view_mode == 'full'?height:undefined, width: view_mode == 'full' ? width: undefined }}>
115
+ {view_mode == 'short' ?
116
+ <TouchableOpacity style={view_styles.section_header} onPress={() => setExpanded(!expanded)}>
117
+ <Icons.PodiumIcon size={18} color={Colors.brand.midnight} />
118
+ <View style={{ flex:1, marginLeft:10 }}>
119
+ <Text theme="header">COMPETITION LEADERBOARD</Text>
120
+ <Text style={{ marginTop: 4 }} theme="body_2">Leaderboard showing current standings</Text>
121
+ </View>
122
+ <Icons.ChevronIcon direction={expanded?'up':'down'} color={Colors.brand.midnight} size={8} />
123
+ </TouchableOpacity>
124
+ :<></>}
125
+ {expanded || view_mode == 'full' ?
126
+ <View style={{ ...view_styles.section_body }}>
127
+ {viewer_record && viewer_result && viewer ?
113
128
  <View>
114
- {competition ?
115
- <Text style={{ padding:20 }} size={18} color={Colors.brand.midnight} weight='bold' textAlign="center">{competition.competition_name}</Text>
116
- :<></>}
117
- <View style={{ backgroundColor:Colors.brand.midnight, padding:10, marginBottom:10 }}>
118
- <Text size={18} color={Colors.shades.white} weight='bold' textAlign="center">Your Position</Text>
119
- <TouchableOpacity style={{ flexDirection:'row', marginTop:15, marginBottom:10, alignItems:'center', borderRadius:22, backgroundColor:Colors.shades.white, padding:8, paddingLeft:15, paddingRight:15}}>
129
+ <View style={{ backgroundColor:Colors.brand.midnight, padding:10, marginBottom:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
130
+ <Text size={14} color={Colors.shades.white} weight='regular'>MY RESULTS</Text>
131
+ <TouchableOpacity style={{ flexDirection:'row', marginTop:10, marginBottom:10, alignItems:'center', borderRadius:22, backgroundColor:Colors.shades.white, padding:8, paddingLeft:15, paddingRight:15}}>
120
132
  <View nativeID="place" style={{ padding:5 }}>
121
- <Text size={12} color={Colors.brand.midnight} weight="bold">{viewer_result.place}</Text>
133
+ <Text size={12} color={Colors.brand.midnight} weight="bold">{CompetitionHelpers.formatPlace(viewer_result.place)}</Text>
122
134
  </View>
123
135
  <View nativeID="image" style={{ paddingLeft:10, paddingRight:10 }}>
124
136
  <Image
@@ -142,7 +154,7 @@ const CompetitionLeaderboard = ({ competition, competition_type, height, viewer_
142
154
  </View>
143
155
  </View>
144
156
  :<></>}
145
- <ScrollView>
157
+ <ScrollView style={{ backgroundColor:Colors.shades.shade100, borderBottomRightRadius:8, borderBottomLeftRadius:8 }}>
146
158
  {loading ?
147
159
  <ActivityIndicator style={{ alignSelf:'center', padding:10 }} size='large' color={Colors.brand.midnight} />
148
160
  :<></>}
@@ -156,26 +168,42 @@ const CompetitionLeaderboard = ({ competition, competition_type, height, viewer_
156
168
  {view_mode == 'short' ?
157
169
  <Button
158
170
  style={{ backgroundColor:undefined }}
159
- title='See Full Leaderboard'
171
+ title='View Full Leaderboard'
160
172
  title_color={Colors.brand.electric}
161
173
  title_size={14}
162
- title_weight="regular"
163
174
  onPress={() => onSeeFull()}
164
175
  />
165
- :
176
+ :<></>}
177
+ {onClose ?
178
+ <View style={{ padding:10, ...view_styles.float }}>
179
+ <View style={{ padding:10, flexDirection:'row', alignItems:'center', justifyContent:'space-between' }}>
180
+ {offset > 0 ?
181
+ <Button
182
+ title='PREV'
183
+ title_color={Colors.brand.electric}
184
+ backgroundColor='transparent'
185
+ onPress={() => getLeaderboardFromServer(competition.competition_id, offset - 1)}
186
+ />
187
+ :<View/>}
188
+ <Button
189
+ title='NEXT'
190
+ title_color={Colors.brand.electric}
191
+ backgroundColor='transparent'
192
+ onPress={() => getLeaderboardFromServer(competition.competition_id, offset + 1)}
193
+ />
194
+ </View>
166
195
  <Button
167
- style={{ margin:10 }}
168
196
  title='Close'
169
- title_color={Colors.brand.electric}
170
- borderWidth={1}
171
- borderRadius={22}
172
- padding={15}
173
- borderColor={Colors.brand.electric}
174
- title_size={14}
175
- title_weight="regular"
176
- onPress={() => onSeeFull()}
197
+ style={{ padding:15 }}
198
+ title_color={Colors.shades.white}
199
+ backgroundColor={Colors.utility.error}
200
+ onPress={() => onClose()}
177
201
  />
178
- }
202
+ </View>
203
+ :<></>}
204
+ </View>
205
+ :<></>}
206
+
179
207
  </View>
180
208
  )
181
209
  }