be-components 5.8.0 → 5.8.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 (122) hide show
  1. package/lib/commonjs/Campaign/api/index.js +124 -0
  2. package/lib/commonjs/Campaign/api/index.js.map +1 -1
  3. package/lib/commonjs/Campaign/components/ActionList.js +46 -9
  4. package/lib/commonjs/Campaign/components/ActionList.js.map +1 -1
  5. package/lib/commonjs/Campaign/components/BetAlert.js +22 -10
  6. package/lib/commonjs/Campaign/components/BetAlert.js.map +1 -1
  7. package/lib/commonjs/Campaign/components/CampaignAnalytics.js +142 -11
  8. package/lib/commonjs/Campaign/components/CampaignAnalytics.js.map +1 -1
  9. package/lib/commonjs/Campaign/components/NewPlayerAlert.js +139 -0
  10. package/lib/commonjs/Campaign/components/NewPlayerAlert.js.map +1 -0
  11. package/lib/commonjs/Campaign/components/ParticipantCard.js +5 -0
  12. package/lib/commonjs/Campaign/components/ParticipantCard.js.map +1 -1
  13. package/lib/commonjs/Campaign/components/ParticipantsList.js +0 -1
  14. package/lib/commonjs/Campaign/components/ParticipantsList.js.map +1 -1
  15. package/lib/commonjs/Campaign/index.js +564 -222
  16. package/lib/commonjs/Campaign/index.js.map +1 -1
  17. package/lib/commonjs/FlashMarket/FlashHolder.js +29 -8
  18. package/lib/commonjs/FlashMarket/FlashHolder.js.map +1 -1
  19. package/lib/commonjs/FlashMarket/index.js +4 -4
  20. package/lib/commonjs/FlashMarket/index.js.map +1 -1
  21. package/lib/commonjs/MarketComponents/api/index.js +21 -0
  22. package/lib/commonjs/MarketComponents/api/index.js.map +1 -1
  23. package/lib/commonjs/Ticker/index.js +112 -26
  24. package/lib/commonjs/Ticker/index.js.map +1 -1
  25. package/lib/module/Campaign/api/index.js +124 -0
  26. package/lib/module/Campaign/api/index.js.map +1 -1
  27. package/lib/module/Campaign/components/ActionList.js +46 -9
  28. package/lib/module/Campaign/components/ActionList.js.map +1 -1
  29. package/lib/module/Campaign/components/BetAlert.js +22 -10
  30. package/lib/module/Campaign/components/BetAlert.js.map +1 -1
  31. package/lib/module/Campaign/components/CampaignAnalytics.js +144 -13
  32. package/lib/module/Campaign/components/CampaignAnalytics.js.map +1 -1
  33. package/lib/module/Campaign/components/NewPlayerAlert.js +132 -0
  34. package/lib/module/Campaign/components/NewPlayerAlert.js.map +1 -0
  35. package/lib/module/Campaign/components/ParticipantCard.js +5 -0
  36. package/lib/module/Campaign/components/ParticipantCard.js.map +1 -1
  37. package/lib/module/Campaign/components/ParticipantsList.js +0 -1
  38. package/lib/module/Campaign/components/ParticipantsList.js.map +1 -1
  39. package/lib/module/Campaign/index.js +564 -222
  40. package/lib/module/Campaign/index.js.map +1 -1
  41. package/lib/module/FlashMarket/FlashHolder.js +29 -8
  42. package/lib/module/FlashMarket/FlashHolder.js.map +1 -1
  43. package/lib/module/FlashMarket/index.js +4 -4
  44. package/lib/module/FlashMarket/index.js.map +1 -1
  45. package/lib/module/MarketComponents/api/index.js +21 -0
  46. package/lib/module/MarketComponents/api/index.js.map +1 -1
  47. package/lib/module/Ticker/index.js +115 -29
  48. package/lib/module/Ticker/index.js.map +1 -1
  49. package/lib/typescript/lib/commonjs/Campaign/api/index.d.ts +11 -0
  50. package/lib/typescript/lib/commonjs/Campaign/api/index.d.ts.map +1 -1
  51. package/lib/typescript/lib/commonjs/Campaign/components/ActionList.d.ts +4 -1
  52. package/lib/typescript/lib/commonjs/Campaign/components/ActionList.d.ts.map +1 -1
  53. package/lib/typescript/lib/commonjs/Campaign/components/BetAlert.d.ts +3 -1
  54. package/lib/typescript/lib/commonjs/Campaign/components/BetAlert.d.ts.map +1 -1
  55. package/lib/typescript/lib/commonjs/Campaign/components/CampaignAnalytics.d.ts +4 -2
  56. package/lib/typescript/lib/commonjs/Campaign/components/CampaignAnalytics.d.ts.map +1 -1
  57. package/lib/typescript/lib/commonjs/Campaign/components/NewPlayerAlert.d.ts +10 -0
  58. package/lib/typescript/lib/commonjs/Campaign/components/NewPlayerAlert.d.ts.map +1 -0
  59. package/lib/typescript/lib/commonjs/Campaign/components/ParticipantCard.d.ts +3 -1
  60. package/lib/typescript/lib/commonjs/Campaign/components/ParticipantCard.d.ts.map +1 -1
  61. package/lib/typescript/lib/commonjs/Campaign/components/ParticipantsList.d.ts.map +1 -1
  62. package/lib/typescript/lib/commonjs/Campaign/index.d.ts +8 -5
  63. package/lib/typescript/lib/commonjs/Campaign/index.d.ts.map +1 -1
  64. package/lib/typescript/lib/commonjs/FlashMarket/FlashHolder.d.ts.map +1 -1
  65. package/lib/typescript/lib/commonjs/MarketComponents/api/index.d.ts +1 -0
  66. package/lib/typescript/lib/commonjs/MarketComponents/api/index.d.ts.map +1 -1
  67. package/lib/typescript/lib/commonjs/Ticker/index.d.ts +2 -1
  68. package/lib/typescript/lib/commonjs/Ticker/index.d.ts.map +1 -1
  69. package/lib/typescript/lib/module/Campaign/api/index.d.ts +11 -0
  70. package/lib/typescript/lib/module/Campaign/api/index.d.ts.map +1 -1
  71. package/lib/typescript/lib/module/Campaign/components/ActionList.d.ts +4 -1
  72. package/lib/typescript/lib/module/Campaign/components/ActionList.d.ts.map +1 -1
  73. package/lib/typescript/lib/module/Campaign/components/BetAlert.d.ts +3 -1
  74. package/lib/typescript/lib/module/Campaign/components/BetAlert.d.ts.map +1 -1
  75. package/lib/typescript/lib/module/Campaign/components/CampaignAnalytics.d.ts +4 -2
  76. package/lib/typescript/lib/module/Campaign/components/CampaignAnalytics.d.ts.map +1 -1
  77. package/lib/typescript/lib/module/Campaign/components/NewPlayerAlert.d.ts +10 -0
  78. package/lib/typescript/lib/module/Campaign/components/NewPlayerAlert.d.ts.map +1 -0
  79. package/lib/typescript/lib/module/Campaign/components/ParticipantCard.d.ts +3 -1
  80. package/lib/typescript/lib/module/Campaign/components/ParticipantCard.d.ts.map +1 -1
  81. package/lib/typescript/lib/module/Campaign/components/ParticipantsList.d.ts.map +1 -1
  82. package/lib/typescript/lib/module/Campaign/index.d.ts +8 -5
  83. package/lib/typescript/lib/module/Campaign/index.d.ts.map +1 -1
  84. package/lib/typescript/lib/module/FlashMarket/FlashHolder.d.ts.map +1 -1
  85. package/lib/typescript/lib/module/MarketComponents/api/index.d.ts +1 -0
  86. package/lib/typescript/lib/module/MarketComponents/api/index.d.ts.map +1 -1
  87. package/lib/typescript/lib/module/Ticker/index.d.ts +2 -1
  88. package/lib/typescript/lib/module/Ticker/index.d.ts.map +1 -1
  89. package/lib/typescript/src/Campaign/api/index.d.ts +21 -6
  90. package/lib/typescript/src/Campaign/api/index.d.ts.map +1 -1
  91. package/lib/typescript/src/Campaign/components/ActionList.d.ts +5 -2
  92. package/lib/typescript/src/Campaign/components/ActionList.d.ts.map +1 -1
  93. package/lib/typescript/src/Campaign/components/BetAlert.d.ts +4 -2
  94. package/lib/typescript/src/Campaign/components/BetAlert.d.ts.map +1 -1
  95. package/lib/typescript/src/Campaign/components/CampaignAnalytics.d.ts +6 -3
  96. package/lib/typescript/src/Campaign/components/CampaignAnalytics.d.ts.map +1 -1
  97. package/lib/typescript/src/Campaign/components/NewPlayerAlert.d.ts +12 -0
  98. package/lib/typescript/src/Campaign/components/NewPlayerAlert.d.ts.map +1 -0
  99. package/lib/typescript/src/Campaign/components/ParticipantCard.d.ts +4 -2
  100. package/lib/typescript/src/Campaign/components/ParticipantCard.d.ts.map +1 -1
  101. package/lib/typescript/src/Campaign/index.d.ts +7 -4
  102. package/lib/typescript/src/Campaign/index.d.ts.map +1 -1
  103. package/lib/typescript/src/FlashMarket/FlashHolder.d.ts.map +1 -1
  104. package/lib/typescript/src/FlashMarket/index.d.ts.map +1 -1
  105. package/lib/typescript/src/MarketComponents/api/index.d.ts +3 -2
  106. package/lib/typescript/src/MarketComponents/api/index.d.ts.map +1 -1
  107. package/lib/typescript/src/Ticker/index.d.ts +2 -1
  108. package/lib/typescript/src/Ticker/index.d.ts.map +1 -1
  109. package/package.json +1 -1
  110. package/src/Campaign/api/index.ts +86 -4
  111. package/src/Campaign/components/ActionList.tsx +38 -13
  112. package/src/Campaign/components/BetAlert.tsx +15 -6
  113. package/src/Campaign/components/CampaignAnalytics.tsx +76 -13
  114. package/src/Campaign/components/NewPlayerAlert.tsx +81 -0
  115. package/src/Campaign/components/ParticipantCard.tsx +7 -2
  116. package/src/Campaign/components/ParticipantsList.tsx +1 -1
  117. package/src/Campaign/index.tsx +421 -188
  118. package/src/FlashMarket/FlashHolder.tsx +17 -6
  119. package/src/FlashMarket/index.tsx +3 -1
  120. package/src/MarketComponents/api/index.ts +16 -2
  121. package/src/Ticker/index.tsx +64 -32
  122. package/src/types.d.ts +3 -0
@@ -0,0 +1,10 @@
1
+ export default NewPlayerAlert;
2
+ declare function NewPlayerAlert({ player, view_mode, campaign_participant, onClose, onViewProfile }: {
3
+ player: any;
4
+ view_mode: any;
5
+ campaign_participant: any;
6
+ onClose: any;
7
+ onViewProfile: any;
8
+ }): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
9
+ import React from 'react';
10
+ //# sourceMappingURL=NewPlayerAlert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NewPlayerAlert.d.ts","sourceRoot":"","sources":["../../../../../module/Campaign/components/NewPlayerAlert.js"],"names":[],"mappings":";AAQA;;;;;;kGAyHC;kBAjIiB,OAAO"}
@@ -1,9 +1,11 @@
1
1
  export default ParticipantCard;
2
- declare function ParticipantCard({ player, campaign_participant, orders, events, analytics }: {
2
+ declare function ParticipantCard({ player, campaign_participant, orders, events, tournaments, matches, analytics }: {
3
3
  player: any;
4
4
  campaign_participant: any;
5
5
  orders: any;
6
6
  events: any;
7
+ tournaments: any;
8
+ matches: any;
7
9
  analytics: any;
8
10
  }): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
9
11
  import React from 'react';
@@ -1 +1 @@
1
- {"version":3,"file":"ParticipantCard.d.ts","sourceRoot":"","sources":["../../../../../module/Campaign/components/ParticipantCard.js"],"names":[],"mappings":";AAOA;;;;;;kGAsHC;kBA7HiB,OAAO"}
1
+ {"version":3,"file":"ParticipantCard.d.ts","sourceRoot":"","sources":["../../../../../module/Campaign/components/ParticipantCard.js"],"names":[],"mappings":";AAOA;;;;;;;;kGA2HC;kBAlIiB,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"ParticipantsList.d.ts","sourceRoot":"","sources":["../../../../../module/Campaign/components/ParticipantsList.js"],"names":[],"mappings":";AAKA;;;;;;;kGAoGC;kBAzG+B,OAAO"}
1
+ {"version":3,"file":"ParticipantsList.d.ts","sourceRoot":"","sources":["../../../../../module/Campaign/components/ParticipantsList.js"],"names":[],"mappings":";AAKA;;;;;;;kGAmGC;kBAxG+B,OAAO"}
@@ -1,13 +1,16 @@
1
1
  export default Campaign;
2
- declare function Campaign({ campaign_id, insets, color_mode, auto, distinct_id, my_participant, action_loading, onCheckIn, onBetNow }: {
2
+ declare function Campaign({ player_id, campaign_id, insets, color_mode, distinct_id, onSelectCompetition, onSelectPollCampaign, onCreateOrder, onViewProfile, onCheckedIn, onCheckedOut, onBetNow }: {
3
+ player_id: any;
3
4
  campaign_id: any;
4
5
  insets: any;
5
6
  color_mode: any;
6
- auto: any;
7
7
  distinct_id: any;
8
- my_participant: any;
9
- action_loading: any;
10
- onCheckIn: any;
8
+ onSelectCompetition: any;
9
+ onSelectPollCampaign: any;
10
+ onCreateOrder: any;
11
+ onViewProfile: any;
12
+ onCheckedIn: any;
13
+ onCheckedOut: any;
11
14
  onBetNow: any;
12
15
  }): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
13
16
  import React from 'react';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Campaign/index.js"],"names":[],"mappings":";AAeA;;;;;;;;;;kGAgaC;kBA/a0C,OAAO"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Campaign/index.js"],"names":[],"mappings":";AAkBA;;;;;;;;;;;;;kGAmvBC;kBArwB0C,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"FlashHolder.d.ts","sourceRoot":"","sources":["../../../../module/FlashMarket/FlashHolder.js"],"names":[],"mappings":";AAUA;;;;;;;;;;;;;;;kGA4WC;kBAtX0C,OAAO"}
1
+ {"version":3,"file":"FlashHolder.d.ts","sourceRoot":"","sources":["../../../../module/FlashMarket/FlashHolder.js"],"names":[],"mappings":";AAUA;;;;;;;;;;;;;;;kGAiYC;kBA3Y0C,OAAO"}
@@ -48,6 +48,7 @@ export namespace MarketComponentHelpers {
48
48
  function isTournamentMarketLocked(tournament: any, market_id: any): boolean;
49
49
  function isMatchMarketLocked(match: any, market_id: any): boolean;
50
50
  function getMatchTimeDetail(match: any): any;
51
+ function getOrderTitle(order: any, market: any, event: any, tournament: any, match: any, athlete: any, team: any): any;
51
52
  function getOrderTitleForTeamEvent(order: any, market: any, event: any, athlete: any, exotic: any): string | undefined;
52
53
  function getOrderTitleForTournament(order: any, market: any, tournament: any, athlete: any, team: any): any;
53
54
  function getOrderTitleForMatch(order: any, market: any, match: any, athlete: any, team: any): any;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../module/MarketComponents/api/index.js"],"names":[],"mappings":";IASkB,gCAMf;IACW,oCAQX;IACa,mDAOb;IACgB,uDAQhB;IACqB,4DAYrB;IACwB,gFAcxB;IACkB,wKAiBlB;IACY,qCAQZ;IACa,gEAQb;IACoB,2DAapB;IACqB,4DAarB;IACiB,0DAajB;IAC8B,0EAa9B;IACc,oDAad;IACW,oCAOX;IACuB,gDAQvB;IACoB,yDAQpB;IACsB,4DAOtB;IACuB,kEAQvB;IACa,oDAYb;IACe,uDAOf;IACuB,+DAQvB;;;IAGY;;;MAOZ;IACsB,4DAQtB;IACa,kEAcb;IACa,wDASb;IACgC,mEAehC;IACqB;;;kBAiCrB;IACU,kCA0BV;IACgB;;;MAYhB;IACoB;;;kBA4CpB;IACoB,kEAepB;IACyB,4EAezB;IACoB,kEAepB;IACmB,6CAWnB;IAC0B,uHAkC1B;IAC2B,4GAkC3B;IACsB,kGAkCtB;IACwB;;;;MAyDxB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../module/MarketComponents/api/index.js"],"names":[],"mappings":";IASkB,gCAMf;IACW,oCAQX;IACa,mDAOb;IACgB,uDAQhB;IACqB,4DAYrB;IACwB,gFAcxB;IACkB,wKAiBlB;IACY,qCAQZ;IACa,gEAQb;IACoB,2DAapB;IACqB,4DAarB;IACiB,0DAajB;IAC8B,0EAa9B;IACc,oDAad;IACW,oCAOX;IACuB,gDAQvB;IACoB,yDAQpB;IACsB,4DAOtB;IACuB,kEAQvB;IACa,oDAYb;IACe,uDAOf;IACuB,+DAQvB;;;IAGY;;;MAOZ;IACsB,4DAQtB;IACa,kEAcb;IACa,wDASb;IACgC,mEAehC;IACqB;;;kBAiCrB;IACU,kCA0BV;IACgB;;;MAYhB;IACoB;;;kBA4CpB;IACoB,kEAepB;IACyB,4EAezB;IACoB,kEAepB;IACmB,6CAWnB;IACc,uHAoBd;IAC0B,uHAkC1B;IAC2B,4GAkC3B;IACsB,kGAkCtB;IACwB;;;;MAyDxB"}
@@ -1,9 +1,10 @@
1
1
  export default Ticker;
2
- declare function Ticker({ league_ids, color_mode, distinct_id, onOrders }: {
2
+ declare function Ticker({ league_ids, color_mode, distinct_id, onOrders, onCreateOrder }: {
3
3
  league_ids: any;
4
4
  color_mode: any;
5
5
  distinct_id: any;
6
6
  onOrders: any;
7
+ onCreateOrder: any;
7
8
  }): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
8
9
  import React from 'react';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Ticker/index.js"],"names":[],"mappings":";AAYA;;;;;kGAwUC;kBApV0C,OAAO"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Ticker/index.js"],"names":[],"mappings":";AAaA;;;;;;kGA6ZC;kBA1a0C,OAAO"}
@@ -1,4 +1,5 @@
1
- import type { CampaignParticipantProps, CampaignProps, OrderAnalyticsProps, OrderProps, OverallOrderAnalyticsProps, PublicPlayerProps } from '../../types';
1
+ import type { CampaignParticipantProps, CampaignProps, CompetitionProps, EventProps, MatchProps, NewOverallAnalytics, OrderAnalyticsProps, OrderProps, PollCampaignProps, PublicPlayerProps, TournamentProps } from '../../types';
2
+ import { type Moment } from 'moment-mini';
2
3
  export declare const CampaignApi: {
3
4
  setEnvironment: () => void;
4
5
  getPlayersByPlayerIds: (player_ids: string[]) => Promise<PublicPlayerProps[]>;
@@ -6,19 +7,33 @@ export declare const CampaignApi: {
6
7
  campaign?: CampaignProps;
7
8
  campaign_participants: CampaignParticipantProps[];
8
9
  }>;
10
+ getPollCampaignsByIds: (poll_campaign_ids: string[]) => Promise<PollCampaignProps[]>;
11
+ getCompetitionsByIds: (competition_ids: string[]) => Promise<CompetitionProps[]>;
12
+ joinCampaign: (campaign_id: string) => Promise<CampaignParticipantProps | undefined>;
13
+ leaveCampaign: (campaign_participant_id: string) => Promise<CampaignParticipantProps | undefined>;
14
+ getMyCampaignParticipants: () => Promise<{
15
+ campaigns: CampaignProps[];
16
+ campaign_participants: CampaignParticipantProps[];
17
+ }>;
9
18
  getCampaignAction: (campaign_id: string) => Promise<OrderProps[]>;
10
19
  getCampaignAnalytics: (campaign_id: string, to: number, from: number) => Promise<OrderAnalyticsProps[]>;
11
20
  };
12
21
  export declare const CampaignHelpers: {
13
- aggregateAnalytics: (analytics: OrderAnalyticsProps[]) => OverallOrderAnalyticsProps & {
14
- roi_pct: number;
15
- win_pct: number;
16
- earnings: number;
17
- };
22
+ aggregateAnalytics: (analytics: OrderAnalyticsProps[]) => NewOverallAnalytics;
23
+ getCampaignLeaderboard: (analytics: OrderAnalyticsProps[]) => NewOverallAnalytics[];
18
24
  getTimeOptions: () => {
19
25
  label: string;
20
26
  to: number;
21
27
  from: number;
22
28
  }[];
29
+ getContestDetails: (contest_type: "team" | "tournament" | "match", event?: EventProps, tournament?: TournamentProps, match?: MatchProps) => {
30
+ contest_title: string;
31
+ contest_details: string;
32
+ };
33
+ sortEngagements: (competitions: CompetitionProps[], poll_campaigns: PollCampaignProps[]) => {
34
+ id: string;
35
+ type: "poll_campaign" | "competition";
36
+ scheduled_datetime: Moment;
37
+ }[];
23
38
  };
24
39
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Campaign/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,aAAa,EAAE,mBAAmB,EAAE,UAAU,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAS3J,eAAO,MAAM,WAAW;;wCASqB,MAAM,EAAE,KAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC;mCAS5C,MAAM,KAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAC,aAAa,CAAC;QAAC,qBAAqB,EAAC,wBAAwB,EAAE,CAAA;KAAC,CAAC;qCAQ1F,MAAM,KAAE,OAAO,CAAC,UAAU,EAAE,CAAC;wCAQ1B,MAAM,MAAK,MAAM,QAAO,MAAM,KAAE,OAAO,CAAC,mBAAmB,EAAE,CAAC;CASzG,CAAA;AAED,eAAO,MAAM,eAAe;oCACO,mBAAmB,EAAE,KAAE,0BAA0B,GAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,QAAQ,EAAC,MAAM,CAAA;KAAC;;;;;;CAkCrI,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Campaign/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,mBA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Props, MatchProps, OrderProps, PublicPlayerProps, TournamentProps } from "../../types";
3
3
  type ActionListProps = {
4
4
  orders: OrderProps[];
5
5
  events: EventProps[];
6
+ tournaments: TournamentProps[];
7
+ matches: MatchProps[];
8
+ hide_header?: boolean;
6
9
  players: PublicPlayerProps[];
7
10
  };
8
- declare const ActionList: ({ orders, events, players }: ActionListProps) => React.JSX.Element;
11
+ declare const ActionList: ({ orders, events, players, tournaments, matches, hide_header }: ActionListProps) => React.JSX.Element;
9
12
  export default ActionList;
10
13
  //# sourceMappingURL=ActionList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionList.d.ts","sourceRoot":"","sources":["../../../../../src/Campaign/components/ActionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAK5E,KAAK,eAAe,GAAG;IACnB,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,OAAO,EAAC,iBAAiB,EAAE,CAAA;CAC9B,CAAA;AAED,QAAA,MAAM,UAAU,GAAI,6BAA4B,eAAe,sBAgD9D,CAAA;AAED,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"ActionList.d.ts","sourceRoot":"","sources":["../../../../../src/Campaign/components/ActionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AASzG,KAAK,eAAe,GAAG;IACnB,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,WAAW,EAAC,eAAe,EAAE,CAAC;IAC9B,OAAO,EAAC,UAAU,EAAE,CAAC;IACrB,WAAW,CAAC,EAAC,OAAO,CAAC;IACrB,OAAO,EAAC,iBAAiB,EAAE,CAAA;CAC9B,CAAA;AAED,QAAA,MAAM,UAAU,GAAI,gEAA+D,eAAe,sBAkEjG,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -1,14 +1,16 @@
1
- import type { AthleteProps, EventProps, OrderProps, PublicPlayerProps, TeamProps } from "../../types";
1
+ import type { AthleteProps, EventProps, LeagueProps, OrderProps, PublicPlayerProps, TeamProps, TournamentProps } from "../../types";
2
2
  import React from 'react';
3
3
  type BetAlertProps = {
4
4
  order: OrderProps;
5
+ league?: LeagueProps;
5
6
  team?: TeamProps;
6
7
  athlete?: AthleteProps;
7
8
  event?: EventProps;
9
+ tournament?: TournamentProps;
8
10
  player?: PublicPlayerProps;
9
11
  color_mode?: 'light' | 'dark';
10
12
  onClose: () => void;
11
13
  };
12
- declare const BetAlert: ({ player, order, team, athlete, event, color_mode, onClose }: BetAlertProps) => React.JSX.Element;
14
+ declare const BetAlert: ({ player, order, league, team, athlete, event, tournament, color_mode, onClose }: BetAlertProps) => React.JSX.Element;
13
15
  export default BetAlert;
14
16
  //# sourceMappingURL=BetAlert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BetAlert.d.ts","sourceRoot":"","sources":["../../../../../src/Campaign/components/BetAlert.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACrG,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,KAAK,aAAa,GAAG;IACjB,KAAK,EAAC,UAAU,CAAC;IACjB,IAAI,CAAC,EAAC,SAAS,CAAC;IAChB,OAAO,CAAC,EAAC,YAAY,CAAC;IACtB,KAAK,CAAC,EAAC,UAAU,CAAC;IAClB,MAAM,CAAC,EAAC,iBAAiB,CAAC;IAC1B,UAAU,CAAC,EAAC,OAAO,GAAC,MAAM,CAAA;IAE1B,OAAO,EAAC,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,QAAQ,GAAI,8DAA6D,aAAa,sBAqF3F,CAAA;AAED,eAAe,QAAQ,CAAA"}
1
+ {"version":3,"file":"BetAlert.d.ts","sourceRoot":"","sources":["../../../../../src/Campaign/components/BetAlert.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AACnI,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,KAAK,aAAa,GAAG;IACjB,KAAK,EAAC,UAAU,CAAC;IACjB,MAAM,CAAC,EAAC,WAAW,CAAC;IACpB,IAAI,CAAC,EAAC,SAAS,CAAC;IAChB,OAAO,CAAC,EAAC,YAAY,CAAC;IACtB,KAAK,CAAC,EAAC,UAAU,CAAC;IAClB,UAAU,CAAC,EAAC,eAAe,CAAC;IAC5B,MAAM,CAAC,EAAC,iBAAiB,CAAC;IAC1B,UAAU,CAAC,EAAC,OAAO,GAAC,MAAM,CAAA;IAE1B,OAAO,EAAC,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,QAAQ,GAAI,kFAAiF,aAAa,sBA2F/G,CAAA;AAED,eAAe,QAAQ,CAAA"}
@@ -1,7 +1,10 @@
1
1
  import React from 'react';
2
- type CampaignAnalyticsProps = {
2
+ import type { CampaignParticipantProps, PublicPlayerProps } from '../../types';
3
+ type CampaignLeaderboardProps = {
3
4
  campaign_id: string;
5
+ players: PublicPlayerProps[];
6
+ campaign_participants: CampaignParticipantProps[];
4
7
  };
5
- declare const CampaignAnalytics: ({ campaign_id }: CampaignAnalyticsProps) => React.JSX.Element;
6
- export default CampaignAnalytics;
8
+ declare const CampaignLeaderboard: ({ campaign_id, players, campaign_participants }: CampaignLeaderboardProps) => React.JSX.Element;
9
+ export default CampaignLeaderboard;
7
10
  //# sourceMappingURL=CampaignAnalytics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CampaignAnalytics.d.ts","sourceRoot":"","sources":["../../../../../src/Campaign/components/CampaignAnalytics.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,KAAK,sBAAsB,GAAG;IAC1B,WAAW,EAAC,MAAM,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,iBAAiB,GAAI,iBAAgB,sBAAsB,sBAuChE,CAAA;AAED,eAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"CampaignAnalytics.d.ts","sourceRoot":"","sources":["../../../../../src/Campaign/components/CampaignAnalytics.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,KAAK,EAAE,wBAAwB,EAA4C,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOzH,KAAK,wBAAwB,GAAG;IAC5B,WAAW,EAAC,MAAM,CAAC;IACnB,OAAO,EAAC,iBAAiB,EAAE,CAAC;IAC5B,qBAAqB,EAAC,wBAAwB,EAAE,CAAA;CACnD,CAAA;AAED,QAAA,MAAM,mBAAmB,GAAI,iDAAgD,wBAAwB,sBAgGpG,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { CampaignParticipantProps, PublicPlayerProps } from "../../types";
3
+ type NewPlayerAlertProps = {
4
+ view_mode: 'desktop' | 'mobile';
5
+ player: PublicPlayerProps;
6
+ campaign_participant: CampaignParticipantProps;
7
+ onViewProfile?: (player: PublicPlayerProps) => void;
8
+ onClose: () => void;
9
+ };
10
+ declare const NewPlayerAlert: ({ player, view_mode, campaign_participant, onClose, onViewProfile }: NewPlayerAlertProps) => React.JSX.Element;
11
+ export default NewPlayerAlert;
12
+ //# sourceMappingURL=NewPlayerAlert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NewPlayerAlert.d.ts","sourceRoot":"","sources":["../../../../../src/Campaign/components/NewPlayerAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAQ9E,KAAK,mBAAmB,GAAG;IACvB,SAAS,EAAC,SAAS,GAAC,QAAQ,CAAC;IAC7B,MAAM,EAAC,iBAAiB,CAAC;IACzB,oBAAoB,EAAC,wBAAwB,CAAC;IAC9C,aAAa,CAAC,EAAC,CAAC,MAAM,EAAC,iBAAiB,KAAK,IAAI,CAAA;IACjD,OAAO,EAAC,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,qEAAoE,mBAAmB,sBA4D9G,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -1,12 +1,14 @@
1
1
  import React from 'react';
2
- import type { CampaignParticipantProps, EventProps, OrderAnalyticsProps, OrderProps, PublicPlayerProps } from "../../types";
2
+ import type { CampaignParticipantProps, EventProps, MatchProps, OrderAnalyticsProps, OrderProps, PublicPlayerProps, TournamentProps } from "../../types";
3
3
  type ParticipantCardProps = {
4
4
  campaign_participant: CampaignParticipantProps;
5
5
  player: PublicPlayerProps;
6
6
  orders: OrderProps[];
7
+ tournaments: TournamentProps[];
8
+ matches: MatchProps[];
7
9
  analytics: OrderAnalyticsProps[];
8
10
  events: EventProps[];
9
11
  };
10
- declare const ParticipantCard: ({ player, campaign_participant, orders, events, analytics }: ParticipantCardProps) => React.JSX.Element;
12
+ declare const ParticipantCard: ({ player, campaign_participant, orders, events, tournaments, matches, analytics }: ParticipantCardProps) => React.JSX.Element;
11
13
  export default ParticipantCard;
12
14
  //# sourceMappingURL=ParticipantCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ParticipantCard.d.ts","sourceRoot":"","sources":["../../../../../src/Campaign/components/ParticipantCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,UAAU,EAAE,mBAAmB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAO3H,KAAK,oBAAoB,GAAG;IACxB,oBAAoB,EAAC,wBAAwB,CAAC;IAC9C,MAAM,EAAC,iBAAiB,CAAC;IACzB,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,SAAS,EAAC,mBAAmB,EAAE,CAAC;IAChC,MAAM,EAAC,UAAU,EAAE,CAAA;CACtB,CAAA;AACD,QAAA,MAAM,eAAe,GAAI,6DAA4D,oBAAoB,sBA2DxG,CAAA;AAED,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"ParticipantCard.d.ts","sourceRoot":"","sources":["../../../../../src/Campaign/components/ParticipantCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,UAAU,EAAE,UAAU,EAAE,mBAAmB,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAOxJ,KAAK,oBAAoB,GAAG;IACxB,oBAAoB,EAAC,wBAAwB,CAAC;IAC9C,MAAM,EAAC,iBAAiB,CAAC;IACzB,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,WAAW,EAAC,eAAe,EAAE,CAAC;IAC9B,OAAO,EAAC,UAAU,EAAE,CAAC;IACrB,SAAS,EAAC,mBAAmB,EAAE,CAAC;IAChC,MAAM,EAAC,UAAU,EAAE,CAAA;CACtB,CAAA;AACD,QAAA,MAAM,eAAe,GAAI,mFAAkF,oBAAoB,sBA8D9H,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -1,11 +1,14 @@
1
1
  import React from 'react';
2
- import type { CampaignParticipantProps, PublicPlayerProps } from '../types';
2
+ import type { CampaignParticipantProps, CompetitionProps, OrderProps, PollCampaignProps, PublicPlayerProps } from '../types';
3
3
  type CampaignAppProps = {
4
4
  player_id?: string;
5
5
  campaign_id: string;
6
6
  distinct_id: string;
7
7
  color_mode?: 'light' | 'dark';
8
+ onCreateOrder?: (order: OrderProps) => void;
8
9
  action_loading?: boolean;
10
+ onSelectPollCampaign: (pc: PollCampaignProps) => void;
11
+ onSelectCompetition: (comp: CompetitionProps) => void;
9
12
  insets?: {
10
13
  bottom: number;
11
14
  top: number;
@@ -15,10 +18,10 @@ type CampaignAppProps = {
15
18
  onBetNow?: () => void;
16
19
  onViewProfile?: (player: PublicPlayerProps) => void;
17
20
  onH2HChallenge?: (player: PublicPlayerProps) => void;
18
- onCheckIn?: () => void;
19
- my_participant?: CampaignParticipantProps;
21
+ onCheckedIn?: (campaign_participant: CampaignParticipantProps) => void;
22
+ onCheckedOut?: (campaign_participant: CampaignParticipantProps) => void;
20
23
  auto?: boolean;
21
24
  };
22
- declare const Campaign: ({ campaign_id, insets, color_mode, auto, distinct_id, my_participant, action_loading, onCheckIn, onBetNow }: CampaignAppProps) => React.JSX.Element;
25
+ declare const Campaign: ({ player_id, campaign_id, insets, color_mode, distinct_id, onSelectCompetition, onSelectPollCampaign, onCreateOrder, onViewProfile, onCheckedIn, onCheckedOut, onBetNow }: CampaignAppProps) => React.JSX.Element;
23
26
  export default Campaign;
24
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Campaign/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAAgB,wBAAwB,EAA2E,iBAAiB,EAAa,MAAM,UAAU,CAAC;AAc9K,KAAK,gBAAgB,GAAG;IACpB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,WAAW,EAAC,MAAM,CAAC;IACnB,WAAW,EAAC,MAAM,CAAC;IACnB,UAAU,CAAC,EAAC,OAAO,GAAC,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAC,OAAO,CAAC;IACxB,MAAM,CAAC,EAAC;QAAE,MAAM,EAAC,MAAM,CAAC;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declare const MarketComponentHelpers: {
50
50
  isTournamentMarketLocked: (tournament: TournamentProps, market_id: string) => boolean;
51
51
  isMatchMarketLocked: (match: MatchProps, market_id: string) => boolean;
52
52
  getMatchTimeDetail: (match: MatchProps) => string;
53
- getOrderTitleForTeamEvent: (order: OrderProps, market: MarketProps, event: EventProps, athlete?: AthleteProps, exotic?: any) => string | undefined;
53
+ getOrderTitle: (order: OrderProps | BestAvailableOrderProps, market: MarketProps, event?: EventProps, tournament?: TournamentProps, match?: MatchProps, athlete?: AthleteProps, team?: TeamProps) => string | undefined;
54
+ getOrderTitleForTeamEvent: (order: OrderProps | BestAvailableOrderProps, market: MarketProps, event: EventProps, athlete?: AthleteProps, exotic?: any) => string | undefined;
54
55
  getOrderTitleForTournament: (order: OrderProps | BestAvailableOrderProps, market: MarketProps, tournament: TournamentProps, athlete?: AthleteProps, team?: TeamProps) => string | undefined;
55
- getOrderTitleForMatch: (order: OrderProps, market: MarketProps, match: MatchProps, athlete?: AthleteProps, team?: TeamProps) => string | undefined;
56
+ getOrderTitleForMatch: (order: OrderProps | BestAvailableOrderProps, market: MarketProps, match: MatchProps, athlete?: AthleteProps, team?: TeamProps) => string | undefined;
56
57
  getExternalPriceDetails: (contest_type: string, market?: MarketProps, event?: EventProps, tournament?: TournamentProps, match?: MatchProps) => {
57
58
  contest_title: string;
58
59
  o_side_label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/MarketComponents/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,WAAW,EAAE,qBAAqB,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAQ1S,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,E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,aAAY,MAAM;mDAME,MAAM;mCAUtB,WAAW,eAAc,qBAAqB,YAAW,YAAY,SAAQ,SAAS;;;;sBAkBlG,MAAM;6BAqBE,UAAU,eAAc,qBAAqB;;;;iCAO5C,UAAU,UAAS,WAAW,eAAc,qBAAqB,YAAW,YAAY,SAAQ,SAAS;;;;iCAwBvG,UAAU,aAAY,MAAM;2CAQnB,eAAe,aAAY,MAAM;iCAQ3C,UAAU,aAAY,MAAM;gCAQ7B,UAAU;2BAQf,UAAU,GAAC,uBAAuB,UAAS,WAAW,UAAS,UAAU,eAAc,eAAe,UAAS,UAAU,YAAW,YAAY,SAAQ,SAAS;uCAcpJ,UAAU,GAAC,uBAAuB,UAAS,WAAW,SAAQ,UAAU,YAAW,YAAY,WAAU,GAAG,KAAE,MAAM,GAAG,SAAS;wCAyB/H,UAAU,GAAG,uBAAuB,UAAS,WAAW,cAAa,eAAe,YAAW,YAAY,SAAQ,SAAS,KAAE,MAAM,GAAG,SAAS;mCAuBrJ,UAAU,GAAC,uBAAuB,UAAS,WAAW,SAAQ,UAAU,YAAW,YAAY,SAAQ,SAAS,KAAE,MAAM,GAAG,SAAS;4CAuB5H,MAAM,WAAU,WAAW,UAAS,UAAU,eAAc,eAAe,UAAS,UAAU;;;;;CAwCxI,CAAA"}
@@ -5,7 +5,8 @@ type TickerProps = {
5
5
  color_mode?: 'light' | 'dark';
6
6
  distinct_id?: string;
7
7
  onOrders?: (orders: OrderProps[]) => void;
8
+ onCreateOrder?: (order: OrderProps) => void;
8
9
  };
9
- declare const Ticker: ({ league_ids, color_mode, distinct_id, onOrders }: TickerProps) => React.JSX.Element;
10
+ declare const Ticker: ({ league_ids, color_mode, distinct_id, onOrders, onCreateOrder }: TickerProps) => React.JSX.Element;
10
11
  export default Ticker;
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Ticker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAA0E,UAAU,EAA0C,MAAM,UAAU,CAAC;AAW3J,KAAK,WAAW,GAAG;IACf,UAAU,EAAC,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAC,OAAO,GAAC,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAC,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAC,CAAC,MAAM,EAAC,UAAU,EAAE,KAAK,IAAI,CAAA;CAC1C,CAAA;AAKD,QAAA,MAAM,MAAM,GAAI,mDAAkD,WAAW,sBAsP5E,CAAA;AAED,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Ticker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAA0E,UAAU,EAA0C,MAAM,UAAU,CAAC;AAY3J,KAAK,WAAW,GAAG;IACf,UAAU,EAAC,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAC,OAAO,GAAC,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAC,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAC,CAAC,MAAM,EAAC,UAAU,EAAE,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,CAAA;CAC5C,CAAA;AAKD,QAAA,MAAM,MAAM,GAAI,kEAAiE,WAAW,sBAoR3F,CAAA;AAED,eAAe,MAAM,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "be-components",
3
- "version": "5.8.0",
3
+ "version": "5.8.2",
4
4
  "description": "Components for BettorEdge Apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -1,13 +1,14 @@
1
1
 
2
2
  import axios from 'axios';
3
- import type { CampaignParticipantProps, CampaignProps, OrderAnalyticsProps, OrderProps, OverallOrderAnalyticsProps, PublicPlayerProps } from '../../types';
3
+ import type { CampaignParticipantProps, CampaignProps, CompetitionProps, EventProps, MatchProps, NewOverallAnalytics, OrderAnalyticsProps, OrderProps, PollCampaignProps, PublicPlayerProps, TournamentProps } from '../../types';
4
4
  import { APIOverrides } from '../../ApiOverrides';
5
- import moment from 'moment-mini';
5
+ import moment, { type Moment } from 'moment-mini';
6
6
 
7
7
  //let SOCIAL_SVC_API = '';
8
8
  //let EVENT_SVC_API = '';
9
9
  let MK_SVC_API = '';
10
10
  let AUTH_SVC_API = '';
11
+ let TP_SVC_API = ''
11
12
 
12
13
  export const CampaignApi = {
13
14
  setEnvironment: () => {
@@ -16,6 +17,7 @@ export const CampaignApi = {
16
17
  //EVENT_SVC_API = endpoints['EVENT_SVC_API'] as string;
17
18
  MK_SVC_API = endpoints['MK_SVC_API'] as string;
18
19
  AUTH_SVC_API = endpoints['AUTH_SVC_API'] as string;
20
+ TP_SVC_API = endpoints['TP_SVC_API'] as string;
19
21
 
20
22
  },
21
23
  getPlayersByPlayerIds : async(player_ids:string[]):Promise<PublicPlayerProps[]> => {
@@ -35,6 +37,51 @@ export const CampaignApi = {
35
37
  return { campaign: undefined, campaign_participants:[] }
36
38
  }
37
39
  },
40
+ getPollCampaignsByIds: async(poll_campaign_ids:string[]):Promise<PollCampaignProps[]> => {
41
+ try {
42
+ if(poll_campaign_ids.length == 0){ return [] }
43
+ const resp = await axios.post(`${AUTH_SVC_API}/v1/polls/campaigns/bulk/get`, { poll_campaign_ids });
44
+ return resp.data.poll_campaigns
45
+ } catch (e) {
46
+ console.log(e)
47
+ return []
48
+ }
49
+ },
50
+ getCompetitionsByIds: async(competition_ids:string[]):Promise<CompetitionProps[]> => {
51
+ try {
52
+ if(competition_ids.length == 0){ return [] }
53
+ const resp = await axios.post(`${TP_SVC_API}/v2/competitions/bulk/get`, { competition_ids });
54
+ return resp.data.competitions
55
+ } catch (e) {
56
+ console.log(e)
57
+ return []
58
+ }
59
+ },
60
+ joinCampaign: async(campaign_id:string):Promise<CampaignParticipantProps|undefined> => {
61
+ try {
62
+ const resp = await axios.post(`${AUTH_SVC_API}/v1/campaigns/campaign/join`, { campaign_id });
63
+ return resp.data.campaign_participant
64
+ } catch (e) {
65
+ console.log(e)
66
+ return undefined
67
+ }
68
+ },
69
+ leaveCampaign: async(campaign_participant_id:string):Promise<CampaignParticipantProps|undefined> => {
70
+ try {
71
+ const resp = await axios.post(`${AUTH_SVC_API}/v1/campaigns/campaign/leave`, { campaign_participant_id });
72
+ return resp.data.campaign_participant
73
+ } catch (e) {
74
+ return undefined
75
+ }
76
+ },
77
+ getMyCampaignParticipants: async():Promise<{ campaigns:CampaignProps[], campaign_participants:CampaignParticipantProps[] }> => {
78
+ try {
79
+ const resp = await axios.get(`${AUTH_SVC_API}/v1/campaigns/participant/me`);
80
+ return resp.data
81
+ } catch (e) {
82
+ return { campaigns:[], campaign_participants:[] }
83
+ }
84
+ },
38
85
  getCampaignAction: async(campaign_id:string):Promise<OrderProps[]> => {
39
86
  try {
40
87
  const resp = await axios.get(`${MK_SVC_API}/v1/orders/campaign/action/${campaign_id}`);
@@ -53,9 +100,8 @@ export const CampaignApi = {
53
100
  }
54
101
  }
55
102
  }
56
-
57
103
  export const CampaignHelpers = {
58
- aggregateAnalytics: (analytics:OrderAnalyticsProps[]):OverallOrderAnalyticsProps&{roi_pct:number, win_pct:number, earnings:number} => {
104
+ aggregateAnalytics: (analytics:OrderAnalyticsProps[]):NewOverallAnalytics => {
59
105
  const wins = analytics.reduce((a,b) => a + b.wins, 0);
60
106
  const losses = analytics.reduce((a,b) => a + b.losses, 0);
61
107
  const draws = analytics.reduce((a,b) => a + b.draws, 0);
@@ -82,11 +128,47 @@ export const CampaignHelpers = {
82
128
  roi_pct
83
129
  }
84
130
  },
131
+ getCampaignLeaderboard: (analytics:OrderAnalyticsProps[]):NewOverallAnalytics[] => {
132
+ let unique_player_ids = [ ...new Set(analytics.map(a => a.player_id)) ]
133
+ let overall_analytics:NewOverallAnalytics[] = []
134
+ unique_player_ids.map(id => {
135
+ let anals = analytics.filter(a => a.player_id == id);
136
+ let agg_analytics = CampaignHelpers.aggregateAnalytics(anals)
137
+ overall_analytics.push({ ...agg_analytics, player_id: id })
138
+ });
139
+ return overall_analytics.sort((a,b) => b.earnings - a.earnings);
140
+ },
85
141
  getTimeOptions: () => {
86
142
  const time_options = [
87
143
  { label: 'All Time', to: moment().unix(), from: moment().subtract(7, 'years').unix() },
88
144
  { label: 'Last 7 Days', to: moment().unix(), from: moment().subtract(7, 'days').unix() }
89
145
  ]
90
146
  return time_options
147
+ },
148
+ getContestDetails: (contest_type:'team'|'tournament'|'match', event?:EventProps, tournament?:TournamentProps, match?:MatchProps) => {
149
+ const default_response = { contest_title: '', contest_details:'' }
150
+ switch(contest_type){
151
+ case 'team':
152
+ if(!event){ return default_response }
153
+ let details = ['created','scheduled'].includes(event.status) ? moment(event.scheduled_datetime).format('MMM dd hh:mm a') : event.status
154
+ return { contest_title: event.event_title, contest_details: details }
155
+ case 'tournament':
156
+ if(!tournament){ return default_response }
157
+ return { contest_title:tournament.tournament_name, contest_details: moment(tournament.scheduled_datetime).format('MMM dd hh:mm a') }
158
+ case 'match':
159
+ if(!match){ return default_response }
160
+ return { contest_title:match.match_title, contest_details: moment(match.scheduled_datetime).format('MMM dd hh:mm a') }
161
+ default: return default_response
162
+ }
163
+ },
164
+ sortEngagements: (competitions:CompetitionProps[], poll_campaigns:PollCampaignProps[]) => {
165
+ let sorted_engagements: { id:string, type:'poll_campaign'|'competition', scheduled_datetime:Moment }[] = []
166
+ competitions.map(c =>
167
+ sorted_engagements.push({ id: c.competition_id, type:'competition', scheduled_datetime: moment(c.scheduled_datetime) })
168
+ )
169
+ poll_campaigns.map(pc =>
170
+ sorted_engagements.push({ id:pc.poll_campaign_id, type:'poll_campaign', scheduled_datetime:moment().add(2, 'hours') })
171
+ )
172
+ return sorted_engagements.sort((a,b) => a.scheduled_datetime.unix() - b.scheduled_datetime.unix())
91
173
  }
92
174
  }
@@ -1,26 +1,36 @@
1
1
  import React from 'react';
2
2
  import { Text, View } from "../../Components/Themed"
3
- import type { EventProps, OrderProps, PublicPlayerProps } from "../../types"
3
+ import type { EventProps, MatchProps, OrderProps, PublicPlayerProps, TournamentProps } from "../../types"
4
4
  import { FlatList, Image } from 'react-native';
5
5
  import moment from 'moment-mini';
6
6
  import OrderGradeBar from '../../MarketComponents/components/OrderGradeBar';
7
+ import { CampaignHelpers } from '../api';
8
+ import { MarketComponentHelpers } from '../../MarketComponents/api';
9
+ import { Icons } from '../../Components';
10
+ import { useColors } from '../../constants/useColors';
7
11
 
8
12
  type ActionListProps = {
9
13
  orders:OrderProps[],
10
14
  events:EventProps[],
15
+ tournaments:TournamentProps[],
16
+ matches:MatchProps[],
17
+ hide_header?:boolean,
11
18
  players:PublicPlayerProps[]
12
19
  }
13
20
 
14
- const ActionList = ({ orders, events, players }:ActionListProps) => {
15
-
21
+ const ActionList = ({ orders, events, players, tournaments, matches, hide_header }:ActionListProps) => {
22
+ const Colors = useColors();
16
23
  const renderAction = (data:{ item:OrderProps, index:number }) => {
17
24
  const event = events.find(e => e.event_id == data.item.event_id);
18
- if(!event){ return <></> }
25
+ const tournament = tournaments.find(t => t.tournament_id == data.item.event_id);
26
+ const match = matches.find(m => m.match_id == data.item.event_id);
27
+ const { contest_title } = CampaignHelpers.getContestDetails(data.item.event_type, event, tournament, match);
28
+
19
29
  const player = players.find(p => p.player_id == data.item.player_id)
20
30
  return (
21
- <View float style={{ margin:10 }}>
31
+ <View float style={{ margin:5 }}>
22
32
  <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>
33
+ <Text style={{ flex:1 }} theme='h2'>{contest_title}</Text>
24
34
  <Text theme='action'>{moment(data.item.create_datetime).fromNow()}</Text>
25
35
  </View>
26
36
  <View transparent style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
@@ -42,7 +52,11 @@ const ActionList = ({ orders, events, players }:ActionListProps) => {
42
52
  view_type='book'
43
53
  />
44
54
  </View>
45
- :<></>}
55
+ :
56
+ <View transparent>
57
+ <Text theme='h1'>{MarketComponentHelpers.getOddsLabel(data.item.odds)}</Text>
58
+ </View>
59
+ }
46
60
  </View>
47
61
  </View>
48
62
  )
@@ -51,12 +65,23 @@ const ActionList = ({ orders, events, players }:ActionListProps) => {
51
65
 
52
66
  return (
53
67
  <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
- />
68
+ {!hide_header ?
69
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
70
+ <Icons.ActivityIcon size={20} color={Colors.text.h1} />
71
+ <View transparent style={{ flex:1, marginLeft:10 }}>
72
+ <Text theme='h1'>Recent Action</Text>
73
+ <Text theme='description' style={{ marginTop:3 }}>Action placed while checked in</Text>
74
+ </View>
75
+ </View>
76
+ :<></>}
77
+ <View>
78
+ <FlatList
79
+ data={orders}
80
+ renderItem={renderAction}
81
+ keyExtractor={(item) => item.order_id.toString()}
82
+ key={'campaign_action'}
83
+ />
84
+ </View>
60
85
  </View>
61
86
  )
62
87
  }