be-components 5.6.5 → 5.6.8
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.
- package/lib/commonjs/Engage/api/index.js +13 -2
- package/lib/commonjs/Engage/api/index.js.map +1 -1
- package/lib/commonjs/Engage/components/EngageHeader.js +2 -0
- package/lib/commonjs/Engage/components/EngageHeader.js.map +1 -1
- package/lib/commonjs/Engage/components/PollCampaignCard.js +110 -0
- package/lib/commonjs/Engage/components/PollCampaignCard.js.map +1 -0
- package/lib/commonjs/Engage/index.js +83 -12
- package/lib/commonjs/Engage/index.js.map +1 -1
- package/lib/commonjs/GolfScoreboard/components/LeaderBetsList.js +111 -59
- package/lib/commonjs/GolfScoreboard/components/LeaderBetsList.js.map +1 -1
- package/lib/commonjs/GolfScoreboard/index.js +13 -5
- package/lib/commonjs/GolfScoreboard/index.js.map +1 -1
- package/lib/commonjs/Poll/api/index.js +12 -0
- package/lib/commonjs/Poll/api/index.js.map +1 -1
- package/lib/commonjs/Poll/components/CampaignHeader.js +13 -2
- package/lib/commonjs/Poll/components/CampaignHeader.js.map +1 -1
- package/lib/commonjs/Poll/components/CampaignLeaderboard.js +1 -4
- package/lib/commonjs/Poll/components/CampaignLeaderboard.js.map +1 -1
- package/lib/commonjs/Poll/index.js +21 -4
- package/lib/commonjs/Poll/index.js.map +1 -1
- package/lib/module/Engage/api/index.js +13 -2
- package/lib/module/Engage/api/index.js.map +1 -1
- package/lib/module/Engage/components/EngageHeader.js +2 -0
- package/lib/module/Engage/components/EngageHeader.js.map +1 -1
- package/lib/module/Engage/components/PollCampaignCard.js +103 -0
- package/lib/module/Engage/components/PollCampaignCard.js.map +1 -0
- package/lib/module/Engage/index.js +83 -12
- package/lib/module/Engage/index.js.map +1 -1
- package/lib/module/GolfScoreboard/components/LeaderBetsList.js +110 -59
- package/lib/module/GolfScoreboard/components/LeaderBetsList.js.map +1 -1
- package/lib/module/GolfScoreboard/index.js +13 -5
- package/lib/module/GolfScoreboard/index.js.map +1 -1
- package/lib/module/Poll/api/index.js +12 -0
- package/lib/module/Poll/api/index.js.map +1 -1
- package/lib/module/Poll/components/CampaignHeader.js +13 -2
- package/lib/module/Poll/components/CampaignHeader.js.map +1 -1
- package/lib/module/Poll/components/CampaignLeaderboard.js +1 -4
- package/lib/module/Poll/components/CampaignLeaderboard.js.map +1 -1
- package/lib/module/Poll/index.js +21 -4
- package/lib/module/Poll/index.js.map +1 -1
- package/lib/typescript/lib/commonjs/Engage/api/index.d.ts +3 -2
- package/lib/typescript/lib/commonjs/Engage/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Engage/components/EngageHeader.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Engage/components/PollCampaignCard.d.ts +7 -0
- package/lib/typescript/lib/commonjs/Engage/components/PollCampaignCard.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Engage/index.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Engage/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/GolfScoreboard/components/LeaderBetsList.d.ts +2 -1
- package/lib/typescript/lib/commonjs/GolfScoreboard/components/LeaderBetsList.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/GolfScoreboard/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/api/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/Poll/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/components/CampaignHeader.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Poll/components/CampaignHeader.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/components/CampaignLeaderboard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Poll/index.d.ts +3 -1
- package/lib/typescript/lib/commonjs/Poll/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Engage/api/index.d.ts +3 -2
- package/lib/typescript/lib/module/Engage/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Engage/components/EngageHeader.d.ts.map +1 -1
- package/lib/typescript/lib/module/Engage/components/PollCampaignCard.d.ts +7 -0
- package/lib/typescript/lib/module/Engage/components/PollCampaignCard.d.ts.map +1 -0
- package/lib/typescript/lib/module/Engage/index.d.ts +2 -1
- package/lib/typescript/lib/module/Engage/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/GolfScoreboard/components/LeaderBetsList.d.ts +2 -1
- package/lib/typescript/lib/module/GolfScoreboard/components/LeaderBetsList.d.ts.map +1 -1
- package/lib/typescript/lib/module/GolfScoreboard/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/api/index.d.ts +1 -0
- package/lib/typescript/lib/module/Poll/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/components/CampaignHeader.d.ts +2 -1
- package/lib/typescript/lib/module/Poll/components/CampaignHeader.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/components/CampaignLeaderboard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Poll/index.d.ts +3 -1
- package/lib/typescript/lib/module/Poll/index.d.ts.map +1 -1
- package/lib/typescript/src/Engage/api/index.d.ts +4 -3
- package/lib/typescript/src/Engage/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Engage/components/PollCampaignCard.d.ts +11 -0
- package/lib/typescript/src/Engage/components/PollCampaignCard.d.ts.map +1 -0
- package/lib/typescript/src/Engage/index.d.ts +4 -3
- package/lib/typescript/src/Engage/index.d.ts.map +1 -1
- package/lib/typescript/src/GolfScoreboard/components/LeaderBetsList.d.ts +2 -1
- package/lib/typescript/src/GolfScoreboard/components/LeaderBetsList.d.ts.map +1 -1
- package/lib/typescript/src/GolfScoreboard/index.d.ts.map +1 -1
- package/lib/typescript/src/Poll/api/index.d.ts +5 -0
- package/lib/typescript/src/Poll/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Poll/components/CampaignHeader.d.ts +2 -1
- package/lib/typescript/src/Poll/components/CampaignHeader.d.ts.map +1 -1
- package/lib/typescript/src/Poll/index.d.ts +8 -1
- package/lib/typescript/src/Poll/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Engage/api/index.ts +14 -3
- package/src/Engage/components/EngageHeader.tsx +2 -2
- package/src/Engage/components/PollCampaignCard.tsx +54 -0
- package/src/Engage/index.tsx +50 -11
- package/src/GolfScoreboard/components/LeaderBetsList.tsx +66 -18
- package/src/GolfScoreboard/index.tsx +6 -5
- package/src/Poll/api/index.ts +9 -0
- package/src/Poll/components/CampaignHeader.tsx +10 -1
- package/src/Poll/components/CampaignLeaderboard.tsx +2 -2
- package/src/Poll/index.tsx +12 -5
- package/src/types.d.ts +9 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { BracketCompetitionProps, BracketProps, CompanyProps, CompetitionPayoutTypeProps, CompetitionProps, CompetitionResultTypeProps, CompetitionSeasonProps, CompetitionTypeProps, EventProps, LeagueProps, PublicPlayerProps, SquaresCompetitionProps } from '../../types';
|
|
1
|
+
import type { BracketCompetitionProps, BracketProps, CompanyProps, CompetitionPayoutTypeProps, CompetitionProps, CompetitionResultTypeProps, CompetitionSeasonProps, CompetitionTypeProps, EventProps, LeagueProps, PollCampaignProps, PublicPlayerProps, SquaresCompetitionProps } from '../../types';
|
|
2
2
|
export { EngageApi, EngageHelpers };
|
|
3
3
|
declare const EngageApi: {
|
|
4
4
|
setEnvironment: () => void;
|
|
5
5
|
getActivePublicCompetitions: () => Promise<CompetitionProps[]>;
|
|
6
|
+
getActivePublicCampaigns: (offset?: number) => Promise<PollCampaignProps[]>;
|
|
6
7
|
searchCompanies: (search_value: string, offset: number) => Promise<CompanyProps[]>;
|
|
7
8
|
getPrivateEngage: (code: string) => Promise<{
|
|
8
9
|
competition?: CompetitionProps;
|
|
@@ -25,8 +26,8 @@ declare const EngageApi: {
|
|
|
25
26
|
getPlayersByPlayerIds: (player_ids: string[]) => Promise<PublicPlayerProps[]>;
|
|
26
27
|
};
|
|
27
28
|
declare const EngageHelpers: {
|
|
28
|
-
getCompanyIdsFromEngage: (comps: CompetitionProps[], sq_comps: SquaresCompetitionProps[], brackets: BracketCompetitionProps[]) => string[];
|
|
29
|
-
getPlayerIdsFromEngage: (comps: CompetitionProps[], sq_comps: SquaresCompetitionProps[], brackets: BracketCompetitionProps[]) => string[];
|
|
29
|
+
getCompanyIdsFromEngage: (comps: CompetitionProps[], sq_comps: SquaresCompetitionProps[], brackets: BracketCompetitionProps[], poll_campaigns: PollCampaignProps[]) => string[];
|
|
30
|
+
getPlayerIdsFromEngage: (comps: CompetitionProps[], sq_comps: SquaresCompetitionProps[], brackets: BracketCompetitionProps[], poll_campaigns: PollCampaignProps[]) => string[];
|
|
30
31
|
getEventIdsFromSquares: (squares: SquaresCompetitionProps[]) => string[];
|
|
31
32
|
getBracketIdsFromBracketComps: (bc: BracketCompetitionProps[]) => string[];
|
|
32
33
|
getSeasonPayoutAmounts: (competition_season: CompetitionSeasonProps) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Engage/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,YAAY,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Engage/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,YAAY,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAMvS,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAA;AAEnC,QAAA,MAAM,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
|
+
import React from 'react';
|
|
2
|
+
import type { CompanyProps, PollCampaignProps, PublicPlayerProps } from '../../types';
|
|
3
|
+
type PollCampaignCardProps = {
|
|
4
|
+
poll_campaign: PollCampaignProps;
|
|
5
|
+
company?: CompanyProps;
|
|
6
|
+
admin?: PublicPlayerProps;
|
|
7
|
+
onSelectPollCampaign: (pc: PollCampaignProps) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const PollCampaignCard: ({ poll_campaign, onSelectPollCampaign }: PollCampaignCardProps) => React.JSX.Element;
|
|
10
|
+
export default PollCampaignCard;
|
|
11
|
+
//# sourceMappingURL=PollCampaignCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PollCampaignCard.d.ts","sourceRoot":"","sources":["../../../../../src/Engage/components/PollCampaignCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAItF,KAAK,qBAAqB,GAAG;IACzB,aAAa,EAAC,iBAAiB,CAAC;IAChC,OAAO,CAAC,EAAC,YAAY,CAAC;IACtB,KAAK,CAAC,EAAC,iBAAiB,CAAC;IACzB,oBAAoB,EAAC,CAAC,EAAE,EAAC,iBAAiB,KAAK,IAAI,CAAA;CACtD,CAAA;AAED,QAAA,MAAM,gBAAgB,GAAI,yCAAwC,qBAAqB,sBAsCtF,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { BEEventProps, BracketCompetitionProps, CompanyProps, CompetitionProps, CompetitionSeasonProps, FocusPositionProps, SquaresCompetitionProps } from '../types';
|
|
2
|
+
import type { BEEventProps, BracketCompetitionProps, CompanyProps, CompetitionProps, CompetitionSeasonProps, FocusPositionProps, PollCampaignProps, SquaresCompetitionProps } from '../types';
|
|
3
3
|
type EngageModuleProps = {
|
|
4
4
|
player_id?: string;
|
|
5
5
|
insets?: {
|
|
@@ -7,7 +7,7 @@ type EngageModuleProps = {
|
|
|
7
7
|
bottom: number;
|
|
8
8
|
};
|
|
9
9
|
view_mode?: 'desktop' | 'mobile';
|
|
10
|
-
init_engagement?: 'competitions' | 'brackets' | 'squares';
|
|
10
|
+
init_engagement?: 'competitions' | 'brackets' | 'squares' | 'polls';
|
|
11
11
|
onEvent?: (be_event: BEEventProps) => void;
|
|
12
12
|
onFocusPosition?: (pos: FocusPositionProps) => void;
|
|
13
13
|
onManage?: () => void;
|
|
@@ -19,9 +19,10 @@ type EngageModuleProps = {
|
|
|
19
19
|
onCreateBracketCompetition?: () => void;
|
|
20
20
|
onSelectCompetition: (c: CompetitionProps) => void;
|
|
21
21
|
onSelectBracketCompetition: (bc: BracketCompetitionProps) => void;
|
|
22
|
+
onSelectPollCampaign: (pc: PollCampaignProps) => void;
|
|
22
23
|
onSelectSquaresCompetition: (sc: SquaresCompetitionProps) => void;
|
|
23
24
|
onSelectCompetitionSeason: (cs: CompetitionSeasonProps) => void;
|
|
24
25
|
};
|
|
25
|
-
declare const EngageModule: ({ view_mode, insets, init_engagement, onBracketRoom, onSelectBracketCompetition, onSelectCompetition, onSelectSquaresCompetition, onSelectCompetitionSeason, onCreateSeason, onCreateCompetition, onCreateBracketCompetition, onCreateSquares, onFocusPosition, onManage, onEvent, onSelectCompany }: EngageModuleProps) => React.JSX.Element;
|
|
26
|
+
declare const EngageModule: ({ view_mode, insets, init_engagement, onSelectPollCampaign, onBracketRoom, onSelectBracketCompetition, onSelectCompetition, onSelectSquaresCompetition, onSelectCompetitionSeason, onCreateSeason, onCreateCompetition, onCreateBracketCompetition, onCreateSquares, onFocusPosition, onManage, onEvent, onSelectCompany }: EngageModuleProps) => React.JSX.Element;
|
|
26
27
|
export default EngageModule;
|
|
27
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Engage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAgB,YAAY,EAA8B,gBAAgB,EAA8B,sBAAsB,EAAoC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Engage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAgB,YAAY,EAA8B,gBAAgB,EAA8B,sBAAsB,EAAoC,kBAAkB,EAAe,iBAAiB,EAAqB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAgBtU,KAAK,iBAAiB,GAAG;IACrB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QAAE,GAAG,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,MAAM,CAAA;KAAE,CAAC;IACvC,SAAS,CAAC,EAAC,SAAS,GAAC,QAAQ,CAAA;IAC7B,eAAe,CAAC,EAAC,cAAc,GAAC,UAAU,GAAC,SAAS,GAAC,OAAO,CAAC;IAC7D,OAAO,CAAC,EAAC,CAAC,QAAQ,EAAC,YAAY,KAAK,IAAI,CAAC;IACzC,eAAe,CAAC,EAAC,CAAC,GAAG,EAAC,kBAAkB,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAC,MAAM,IAAI,CAAC;IACrB,aAAa,CAAC,EAAC,MAAM,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAC,MAAM,IAAI,CAAC;IAC3B,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,KAAK,IAAI,CAAC;IAC1C,mBAAmB,CAAC,EAAC,MAAM,IAAI,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,0BAA0B,CAAC,EAAC,MAAM,IAAI,CAAC;IACvC,mBAAmB,EAAC,CAAC,CAAC,EAAC,gBAAgB,KAAK,IAAI,CAAC;IACjD,0BAA0B,EAAC,CAAC,EAAE,EAAC,uBAAuB,KAAK,IAAI,CAAC;IAChE,oBAAoB,EAAC,CAAC,EAAE,EAAC,iBAAiB,KAAK,IAAI,CAAC;IACpD,0BAA0B,EAAC,CAAC,EAAE,EAAC,uBAAuB,KAAK,IAAI,CAAC;IAChE,yBAAyB,EAAC,CAAC,EAAE,EAAC,sBAAsB,KAAK,IAAI,CAAA;CAChE,CAAA;AAID,QAAA,MAAM,YAAY,GAAI,4TAEnB,iBAAiB,sBA2enB,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -4,10 +4,11 @@ type LeaderBetsListProps = {
|
|
|
4
4
|
golf_leader: GolfLeaderProps;
|
|
5
5
|
athlete: AthleteProps;
|
|
6
6
|
orders: OrderProps[];
|
|
7
|
+
max_height?: number;
|
|
7
8
|
markets: MarketProps[];
|
|
8
9
|
active_round?: number;
|
|
9
10
|
onClose: () => void;
|
|
10
11
|
};
|
|
11
|
-
declare const LeaderBetsList: ({ golf_leader, athlete, orders, markets, active_round, onClose }: LeaderBetsListProps) => React.JSX.Element;
|
|
12
|
+
declare const LeaderBetsList: ({ golf_leader, athlete, orders, markets, max_height, active_round, onClose }: LeaderBetsListProps) => React.JSX.Element;
|
|
12
13
|
export default LeaderBetsList;
|
|
13
14
|
//# sourceMappingURL=LeaderBetsList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeaderBetsList.d.ts","sourceRoot":"","sources":["../../../../../src/GolfScoreboard/components/LeaderBetsList.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"LeaderBetsList.d.ts","sourceRoot":"","sources":["../../../../../src/GolfScoreboard/components/LeaderBetsList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAO1F,KAAK,mBAAmB,GAAG;IACvB,WAAW,EAAC,eAAe,CAAC;IAC5B,OAAO,EAAC,YAAY,CAAC;IACrB,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,UAAU,CAAC,EAAC,MAAM,CAAC;IACnB,OAAO,EAAC,WAAW,EAAE,CAAC;IACtB,YAAY,CAAC,EAAC,MAAM,CAAC;IACrB,OAAO,EAAC,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,8EAA6E,mBAAmB,sBA+IvH,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/GolfScoreboard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAgB,uBAAuB,EAA+F,WAAW,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAC;AAc7M,KAAK,mBAAmB,GAAG;IACvB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,aAAa,EAAC,MAAM,CAAC;IACrB,OAAO,EAAC,WAAW,EAAE,CAAC;IACtB,SAAS,EAAC,UAAU,EAAE,CAAC;IACvB,cAAc,EAAC,uBAAuB,EAAE,CAAC;IACzC,OAAO,EAAC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,CAAC;IACnC,OAAO,EAAC,MAAM,IAAI,CAAA;CACrB,CAAA;AAGD,QAAA,MAAM,cAAc,GAAI,oFAAmF,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/GolfScoreboard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAgB,uBAAuB,EAA+F,WAAW,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAC;AAc7M,KAAK,mBAAmB,GAAG;IACvB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,aAAa,EAAC,MAAM,CAAC;IACrB,OAAO,EAAC,WAAW,EAAE,CAAC;IACtB,SAAS,EAAC,UAAU,EAAE,CAAC;IACvB,cAAc,EAAC,uBAAuB,EAAE,CAAC;IACzC,OAAO,EAAC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,CAAC;IACnC,OAAO,EAAC,MAAM,IAAI,CAAA;CACrB,CAAA;AAGD,QAAA,MAAM,cAAc,GAAI,oFAAmF,mBAAmB,sBA2d7H,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -52,6 +52,11 @@ declare const PollCampaignGoalApi: {
|
|
|
52
52
|
updatePollCampaignGoal: (poll_campaign_goal: PollCampaignGoalProps) => Promise<PollCampaignGoalProps>;
|
|
53
53
|
};
|
|
54
54
|
declare const PollResponseApi: {
|
|
55
|
+
createPMOrder: (poll_option_id: string, stake: number) => Promise<{
|
|
56
|
+
poll_response: PollResponseProps;
|
|
57
|
+
my_leader: PollCampaignLeaderProps;
|
|
58
|
+
poll_campaign: PollCampaignProps;
|
|
59
|
+
} | undefined>;
|
|
55
60
|
createPollResponse: (poll_response: PollResponseProps) => Promise<PollResponseProps>;
|
|
56
61
|
getResponseByPollId: (poll_id: string) => Promise<PollResponseProps | undefined>;
|
|
57
62
|
getRespondersByPollId: (poll_id: string, offset: number) => Promise<string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/api/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,eAAe,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAMtK,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,OAAO,EACP,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,mBAAmB,EACtB,CAA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../types';
|
|
3
3
|
type CampaignHeaderProps = {
|
|
4
4
|
poll_campaign: PollCampaignProps;
|
|
5
|
+
onBack?: () => void;
|
|
5
6
|
onSharePollCampaign: (pc: PollCampaignProps) => void;
|
|
6
7
|
};
|
|
7
|
-
declare const CampaignHeader: ({ poll_campaign, onSharePollCampaign }: CampaignHeaderProps) => React.JSX.Element;
|
|
8
|
+
declare const CampaignHeader: ({ poll_campaign, onSharePollCampaign, onBack }: CampaignHeaderProps) => React.JSX.Element;
|
|
8
9
|
export default CampaignHeader;
|
|
9
10
|
//# sourceMappingURL=CampaignHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CampaignHeader.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/CampaignHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKrD,KAAK,mBAAmB,GAAG;IACvB,aAAa,EAAC,iBAAiB,CAAC;IAChC,mBAAmB,EAAC,CAAC,EAAE,EAAC,iBAAiB,KAAK,IAAI,CAAA;CACrD,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,
|
|
1
|
+
{"version":3,"file":"CampaignHeader.d.ts","sourceRoot":"","sources":["../../../../../src/Poll/components/CampaignHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKrD,KAAK,mBAAmB,GAAG;IACvB,aAAa,EAAC,iBAAiB,CAAC;IAChC,MAAM,CAAC,EAAC,MAAM,IAAI,CAAC;IACnB,mBAAmB,EAAC,CAAC,EAAE,EAAC,iBAAiB,KAAK,IAAI,CAAA;CACrD,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,gDAA+C,mBAAmB,sBA6BzF,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -6,11 +6,18 @@ type PollCampaignModuleProps = {
|
|
|
6
6
|
player_id?: string;
|
|
7
7
|
view_mode: 'desktop' | 'mobile';
|
|
8
8
|
distinct_id: string;
|
|
9
|
+
insets?: {
|
|
10
|
+
top: number;
|
|
11
|
+
bottom: number;
|
|
12
|
+
left: number;
|
|
13
|
+
right: number;
|
|
14
|
+
};
|
|
15
|
+
onBack?: () => void;
|
|
9
16
|
onEvent?: (be_event: BEEventProps) => void;
|
|
10
17
|
onRequestAuthenticate: (auth_strategy_id?: string, company_id?: string) => void;
|
|
11
18
|
onSharePollCampaign: (poll_campaign: PollCampaignProps) => void;
|
|
12
19
|
onComplete: () => void;
|
|
13
20
|
};
|
|
14
|
-
declare const PollCampaign: ({ distinct_id, view_mode, poll_campaign_id, player_id, onRequestAuthenticate, onSharePollCampaign }: PollCampaignModuleProps) => React.JSX.Element;
|
|
21
|
+
declare const PollCampaign: ({ distinct_id, view_mode, poll_campaign_id, player_id, insets, onBack, onRequestAuthenticate, onSharePollCampaign }: PollCampaignModuleProps) => React.JSX.Element;
|
|
15
22
|
export default PollCampaign;
|
|
16
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Poll/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAAE,YAAY,EAAyB,iBAAiB,EAAiD,MAAM,UAAU,CAAC;AAUtI,KAAK,uBAAuB,GAAG;IAC3B,gBAAgB,EAAC,MAAM,CAAC;IACxB,OAAO,CAAC,EAAC,MAAM,CAAC;IAChB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,SAAS,EAAC,SAAS,GAAC,QAAQ,CAAC;IAC7B,WAAW,EAAC,MAAM,CAAC;IACnB,OAAO,CAAC,EAAC,CAAC,QAAQ,EAAC,YAAY,KAAK,IAAI,CAAC;IACzC,qBAAqB,EAAE,CAAC,gBAAgB,CAAC,EAAC,MAAM,EAAE,UAAU,CAAC,EAAC,MAAM,KAAK,IAAI,CAAC;IAC9E,mBAAmB,EAAE,CAAC,aAAa,EAAC,iBAAiB,KAAK,IAAI,CAAC;IAC/D,UAAU,EAAC,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Poll/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAAE,YAAY,EAAyB,iBAAiB,EAAiD,MAAM,UAAU,CAAC;AAUtI,KAAK,uBAAuB,GAAG;IAC3B,gBAAgB,EAAC,MAAM,CAAC;IACxB,OAAO,CAAC,EAAC,MAAM,CAAC;IAChB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,SAAS,EAAC,SAAS,GAAC,QAAQ,CAAC;IAC7B,WAAW,EAAC,MAAM,CAAC;IACnB,MAAM,CAAC,EAAC;QAAE,GAAG,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,CAAA;KAAE,CAAC;IACjE,MAAM,CAAC,EAAC,MAAM,IAAI,CAAC;IACnB,OAAO,CAAC,EAAC,CAAC,QAAQ,EAAC,YAAY,KAAK,IAAI,CAAC;IACzC,qBAAqB,EAAE,CAAC,gBAAgB,CAAC,EAAC,MAAM,EAAE,UAAU,CAAC,EAAC,MAAM,KAAK,IAAI,CAAC;IAC9E,mBAAmB,EAAE,CAAC,aAAa,EAAC,iBAAiB,KAAK,IAAI,CAAC;IAC/D,UAAU,EAAC,MAAM,IAAI,CAAA;CAExB,CAAA;AAGD,QAAA,MAAM,YAAY,GAAI,qHAAqH,uBAAuB,sBAiPjK,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/package.json
CHANGED
package/src/Engage/api/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import { APIOverrides } from "../../ApiOverrides";
|
|
3
|
-
import type { BracketCompetitionProps, BracketProps, CompanyProps, CompetitionPayoutTypeProps, CompetitionProps, CompetitionResultTypeProps, CompetitionSeasonProps, CompetitionTypeProps, EventProps, LeagueProps, PublicPlayerProps, SquaresCompetitionProps } from '../../types';
|
|
3
|
+
import type { BracketCompetitionProps, BracketProps, CompanyProps, CompetitionPayoutTypeProps, CompetitionProps, CompetitionResultTypeProps, CompetitionSeasonProps, CompetitionTypeProps, EventProps, LeagueProps, PollCampaignProps, PublicPlayerProps, SquaresCompetitionProps } from '../../types';
|
|
4
4
|
|
|
5
5
|
let AUTH_SVC_API = ''
|
|
6
6
|
let TP_SVC_API = ''
|
|
@@ -24,6 +24,15 @@ const EngageApi = {
|
|
|
24
24
|
return []
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
+
getActivePublicCampaigns: async(offset?:number):Promise<PollCampaignProps[]> => {
|
|
28
|
+
try {
|
|
29
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v1/polls/public/active?offset=${offset??0}`);
|
|
30
|
+
console.log(resp.data)
|
|
31
|
+
return resp.data.poll_campaigns
|
|
32
|
+
} catch (e) {
|
|
33
|
+
return []
|
|
34
|
+
}
|
|
35
|
+
},
|
|
27
36
|
searchCompanies: async(search_value:string, offset:number):Promise<CompanyProps[]> => {
|
|
28
37
|
try {
|
|
29
38
|
const resp = await axios.post(`${AUTH_SVC_API}/v1/companies/search`, { search_value, offset })
|
|
@@ -125,17 +134,19 @@ const EngageApi = {
|
|
|
125
134
|
|
|
126
135
|
|
|
127
136
|
const EngageHelpers = {
|
|
128
|
-
getCompanyIdsFromEngage: (comps:CompetitionProps[], sq_comps:SquaresCompetitionProps[], brackets:BracketCompetitionProps[]) => {
|
|
137
|
+
getCompanyIdsFromEngage: (comps:CompetitionProps[], sq_comps:SquaresCompetitionProps[], brackets:BracketCompetitionProps[], poll_campaigns:PollCampaignProps[]) => {
|
|
129
138
|
let ids = comps.filter(c => c.company_id).map(c => c.company_id ?? '0')
|
|
130
139
|
ids = ids.concat(sq_comps.filter(s => s.company_id).map(s => s.company_id ?? '0'))
|
|
131
140
|
ids = ids.concat(brackets.filter(b => b.company_id).map(b => b.company_id ?? '0'))
|
|
141
|
+
ids = ids.concat(poll_campaigns.filter(pc => pc.company_id).map(pc => pc.company_id ?? '0'));
|
|
132
142
|
return [ ...new Set(ids.map(id => id)) ]
|
|
133
143
|
},
|
|
134
|
-
getPlayerIdsFromEngage: (comps:CompetitionProps[], sq_comps:SquaresCompetitionProps[], brackets:BracketCompetitionProps[]) => {
|
|
144
|
+
getPlayerIdsFromEngage: (comps:CompetitionProps[], sq_comps:SquaresCompetitionProps[], brackets:BracketCompetitionProps[], poll_campaigns:PollCampaignProps[]) => {
|
|
135
145
|
let ids = comps.map(c => c.admin_id);
|
|
136
146
|
ids = ids.concat(comps.filter(c => c.pacer_id).map(c => c.pacer_id ?? '0'))
|
|
137
147
|
ids = ids.concat(sq_comps.map(s => s.admin_id))
|
|
138
148
|
ids = ids.concat(brackets.map(b => b.admin_id))
|
|
149
|
+
ids = ids.concat(poll_campaigns.map(pc => pc.player_id));
|
|
139
150
|
return [ ...new Set(ids.map(id => id)) ]
|
|
140
151
|
},
|
|
141
152
|
getEventIdsFromSquares: (squares:SquaresCompetitionProps[]) => {
|
|
@@ -104,7 +104,7 @@ const EngageHeader = ({ companies, width, view_mode, onManage, onEvent, onSelect
|
|
|
104
104
|
</LinearGradient>
|
|
105
105
|
<View transparent style={{ padding:10 }}>
|
|
106
106
|
<Button float style={{ flexDirection:'row', alignItems:'center', marginBottom:10 }} onPress={() => setSearch({ ...search, active: !active })}>
|
|
107
|
-
<View style={{ flex:1, marginRight:10 }}>
|
|
107
|
+
<View transparent style={{ flex:1, marginRight:10 }}>
|
|
108
108
|
<Text theme='h1'>{active?'Search':'Support'} Our Partners!</Text>
|
|
109
109
|
{active ?
|
|
110
110
|
<Text style={{ marginTop:3 }} theme='description'>Use the search box below to find a brand that you're interested in!</Text>
|
|
@@ -112,7 +112,7 @@ const EngageHeader = ({ companies, width, view_mode, onManage, onEvent, onSelect
|
|
|
112
112
|
<Text style={{ marginTop:3 }} theme='description'>Below are brands that currently have availble competitions!</Text>
|
|
113
113
|
}
|
|
114
114
|
</View>
|
|
115
|
-
<View float style={{ height:30, width:30, backgroundColor:Colors.views.header, borderRadius:100, justifyContent:'center', alignItems:'center' }}>
|
|
115
|
+
<View transparent float style={{ height:30, width:30, backgroundColor:Colors.views.header, borderRadius:100, justifyContent:'center', alignItems:'center' }}>
|
|
116
116
|
{active ?
|
|
117
117
|
<Icons.CloseIcon color={Colors.text.error} size={12} />
|
|
118
118
|
:
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Text, View } from "../../Components/Themed"
|
|
3
|
+
import type { CompanyProps, PollCampaignProps, PublicPlayerProps } from '../../types';
|
|
4
|
+
import { Image } from 'react-native';
|
|
5
|
+
import { useColors } from '../../constants/useColors';
|
|
6
|
+
|
|
7
|
+
type PollCampaignCardProps = {
|
|
8
|
+
poll_campaign:PollCampaignProps,
|
|
9
|
+
company?:CompanyProps,
|
|
10
|
+
admin?:PublicPlayerProps,
|
|
11
|
+
onSelectPollCampaign:(pc:PollCampaignProps) => void
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const PollCampaignCard = ({ poll_campaign, onSelectPollCampaign }:PollCampaignCardProps) => {
|
|
15
|
+
const Colors = useColors();
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Button float style={{ flex:1, padding:0 }} onPress={() => onSelectPollCampaign(poll_campaign)}>
|
|
19
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
|
|
20
|
+
<Image
|
|
21
|
+
source={{ uri: poll_campaign.campaign_image?.url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
22
|
+
style={{ height:45, width:45, borderRadius:4}}
|
|
23
|
+
resizeMode='cover'
|
|
24
|
+
/>
|
|
25
|
+
<View transparent style={{ flex:1, marginLeft:10, marginRight:10 }}>
|
|
26
|
+
<Text theme='h2'>{poll_campaign.name}</Text>
|
|
27
|
+
<Text style={{ marginTop:3 }} theme='description'>{poll_campaign.campaign_type.toUpperCase()}</Text>
|
|
28
|
+
</View>
|
|
29
|
+
|
|
30
|
+
</View>
|
|
31
|
+
<View transparent style={{ padding:10 }}>
|
|
32
|
+
<View type='row' transparent>
|
|
33
|
+
<View transparent style={{ flex:1, justifyContent:'center', alignItems:'center' }}>
|
|
34
|
+
<Text size={18} color={Colors.text.h1} weight='bold'>{poll_campaign.total_polls}</Text>
|
|
35
|
+
<Text style={{ marginTop:3 }} theme='description'>Questions</Text>
|
|
36
|
+
</View>
|
|
37
|
+
</View>
|
|
38
|
+
</View>
|
|
39
|
+
{poll_campaign.prize_override ?
|
|
40
|
+
<View type='footer' style={{ flexDirection:'row', alignItems:'center', padding:10, borderBottomRightRadius:8, borderBottomLeftRadius:8 }}>
|
|
41
|
+
<Image
|
|
42
|
+
source={{ uri: poll_campaign.prize_image?.url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1693344377/cash_prize_zalhgb.webp' }}
|
|
43
|
+
style={{ height:40, width:40 }}
|
|
44
|
+
/>
|
|
45
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
46
|
+
<Text theme='h2' color={Colors.text.gold}>{poll_campaign.prize_override}</Text>
|
|
47
|
+
</View>
|
|
48
|
+
</View>
|
|
49
|
+
:<></>}
|
|
50
|
+
</Button>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default PollCampaignCard
|
package/src/Engage/index.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { ActivityIndicator, FlatList, Image, KeyboardAvoidingView, Modal, Platform } from 'react-native';
|
|
3
|
-
import type { BEEventProps, BracketCompetitionProps, BracketProps, CompanyProps, CompetitionPayoutTypeProps, CompetitionProps, CompetitionResultTypeProps, CompetitionSeasonProps, CompetitionTypeProps, EventProps, FocusPositionProps, LeagueProps, PublicPlayerProps, SquaresCompetitionProps } from '../types';
|
|
3
|
+
import type { BEEventProps, BracketCompetitionProps, BracketProps, CompanyProps, CompetitionPayoutTypeProps, CompetitionProps, CompetitionResultTypeProps, CompetitionSeasonProps, CompetitionTypeProps, EventProps, FocusPositionProps, LeagueProps, PollCampaignProps, PublicPlayerProps, SquaresCompetitionProps } from '../types';
|
|
4
4
|
import { EngageApi, EngageHelpers } from './api';
|
|
5
5
|
import CompetitionCard from './components/CompetitionCard';
|
|
6
6
|
import { Icons, Toggle } from '../Components';
|
|
@@ -13,13 +13,14 @@ import EngageHeader from './components/EngageHeader';
|
|
|
13
13
|
import PrivateCodePrompt from './components/PrivateCodePrompt';
|
|
14
14
|
import { Button, Text, View } from '../Components/Themed';
|
|
15
15
|
import { useColors } from '../constants/useColors';
|
|
16
|
+
import PollCampaignCard from './components/PollCampaignCard';
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
type EngageModuleProps = {
|
|
19
20
|
player_id?:string,
|
|
20
21
|
insets?: { top:number, bottom:number },
|
|
21
22
|
view_mode?:'desktop'|'mobile'
|
|
22
|
-
init_engagement?:'competitions'|'brackets'|'squares',
|
|
23
|
+
init_engagement?:'competitions'|'brackets'|'squares'|'polls',
|
|
23
24
|
onEvent?:(be_event:BEEventProps) => void,
|
|
24
25
|
onFocusPosition?:(pos:FocusPositionProps) => void,
|
|
25
26
|
onManage?:() => void,
|
|
@@ -31,13 +32,14 @@ type EngageModuleProps = {
|
|
|
31
32
|
onCreateBracketCompetition?:() => void,
|
|
32
33
|
onSelectCompetition:(c:CompetitionProps) => void,
|
|
33
34
|
onSelectBracketCompetition:(bc:BracketCompetitionProps) => void,
|
|
35
|
+
onSelectPollCampaign:(pc:PollCampaignProps) => void,
|
|
34
36
|
onSelectSquaresCompetition:(sc:SquaresCompetitionProps) => void,
|
|
35
37
|
onSelectCompetitionSeason:(cs:CompetitionSeasonProps) => void
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
const engage_sections = ['header','toggle', 'private','engagements']
|
|
39
41
|
const MIN_ENGAGEMENT_WIDTH = 325
|
|
40
|
-
const EngageModule = ({ view_mode, insets, init_engagement, onBracketRoom, onSelectBracketCompetition, onSelectCompetition, onSelectSquaresCompetition, onSelectCompetitionSeason,
|
|
42
|
+
const EngageModule = ({ view_mode, insets, init_engagement, onSelectPollCampaign, onBracketRoom, onSelectBracketCompetition, onSelectCompetition, onSelectSquaresCompetition, onSelectCompetitionSeason,
|
|
41
43
|
onCreateSeason, onCreateCompetition, onCreateBracketCompetition, onCreateSquares, onFocusPosition, onManage, onEvent, onSelectCompany
|
|
42
44
|
}:EngageModuleProps) => {
|
|
43
45
|
const [ module_size, setModuleSize ] = useState({ width:0, height:0 });
|
|
@@ -52,6 +54,7 @@ const EngageModule = ({ view_mode, insets, init_engagement, onBracketRoom, onSel
|
|
|
52
54
|
const [ module_data, setModuleData ] = useState<{
|
|
53
55
|
loading:boolean,
|
|
54
56
|
competitions:CompetitionProps[],
|
|
57
|
+
poll_campaigns:PollCampaignProps[],
|
|
55
58
|
competition_seasons:CompetitionSeasonProps[],
|
|
56
59
|
competition_types:CompetitionTypeProps[],
|
|
57
60
|
competition_result_types:CompetitionResultTypeProps[],
|
|
@@ -68,6 +71,7 @@ const EngageModule = ({ view_mode, insets, init_engagement, onBracketRoom, onSel
|
|
|
68
71
|
loading:false,
|
|
69
72
|
competitions: [],
|
|
70
73
|
competition_seasons:[],
|
|
74
|
+
poll_campaigns: [],
|
|
71
75
|
companies:[],
|
|
72
76
|
leagues:[],
|
|
73
77
|
events:[],
|
|
@@ -79,7 +83,7 @@ const EngageModule = ({ view_mode, insets, init_engagement, onBracketRoom, onSel
|
|
|
79
83
|
bracket_competitions:[],
|
|
80
84
|
players:[]
|
|
81
85
|
});
|
|
82
|
-
const { loading, competitions, selected_bracket, competition_seasons, competition_result_types, squares_competitions, brackets, leagues, bracket_competitions, events, competition_types, companies, players } = module_data;
|
|
86
|
+
const { loading, competitions, poll_campaigns, selected_bracket, competition_seasons, competition_result_types, squares_competitions, brackets, leagues, bracket_competitions, events, competition_types, companies, players } = module_data;
|
|
83
87
|
const Colors = useColors();
|
|
84
88
|
|
|
85
89
|
const visible_competitions = competitions.filter(c => moment().isBefore(moment(c.scheduled_datetime)))
|
|
@@ -112,10 +116,11 @@ const EngageModule = ({ view_mode, insets, init_engagement, onBracketRoom, onSel
|
|
|
112
116
|
const comps = await EngageApi.getActivePublicCompetitions();
|
|
113
117
|
const seasons = await EngageApi.getActivePublicSeasons();
|
|
114
118
|
const brackets = await EngageApi.getActivePublicBrackets();
|
|
119
|
+
const pcs = await EngageApi.getActivePublicCampaigns();
|
|
115
120
|
const squares = await EngageApi.getActivePublicSquares();
|
|
116
|
-
const company_ids = EngageHelpers.getCompanyIdsFromEngage(comps, squares, brackets);
|
|
121
|
+
const company_ids = EngageHelpers.getCompanyIdsFromEngage(comps, squares, brackets, pcs);
|
|
117
122
|
const cpanys = await EngageApi.getCompaniesByIds(company_ids);
|
|
118
|
-
const player_ids = EngageHelpers.getPlayerIdsFromEngage(comps, squares, brackets);
|
|
123
|
+
const player_ids = EngageHelpers.getPlayerIdsFromEngage(comps, squares, brackets, pcs);
|
|
119
124
|
const plyers = await EngageApi.getPlayersByPlayerIds(player_ids)
|
|
120
125
|
const opts = await EngageApi.getCompetitionOptions();
|
|
121
126
|
const event_ids = EngageHelpers.getEventIdsFromSquares(squares);
|
|
@@ -128,6 +133,7 @@ const EngageModule = ({ view_mode, insets, init_engagement, onBracketRoom, onSel
|
|
|
128
133
|
loading:false,
|
|
129
134
|
competitions:comps,
|
|
130
135
|
competition_seasons: seasons,
|
|
136
|
+
poll_campaigns: pcs.filter(pc => (pc.active_polls??0) > 0),
|
|
131
137
|
bracket_competitions:brackets,
|
|
132
138
|
competition_types: opts.competition_types,
|
|
133
139
|
competition_result_types: opts.competition_result_types,
|
|
@@ -238,6 +244,21 @@ const EngageModule = ({ view_mode, insets, init_engagement, onBracketRoom, onSel
|
|
|
238
244
|
)
|
|
239
245
|
}
|
|
240
246
|
|
|
247
|
+
const renderPollCampaigns = (data: { item:PollCampaignProps, index:number }) => {
|
|
248
|
+
const company = companies.find(c => c.company_id == data.item.company_id)
|
|
249
|
+
const admin = players.find(p => p.player_id == data.item.player_id);
|
|
250
|
+
return (
|
|
251
|
+
<View key={data.item.poll_campaign_id.toString()} transparent style={{ margin:10, width:engagement_width }}>
|
|
252
|
+
<PollCampaignCard
|
|
253
|
+
poll_campaign={data.item}
|
|
254
|
+
company={company}
|
|
255
|
+
admin={admin}
|
|
256
|
+
onSelectPollCampaign={(c) => onSelectPollCampaign(c)}
|
|
257
|
+
/>
|
|
258
|
+
</View>
|
|
259
|
+
)
|
|
260
|
+
}
|
|
261
|
+
|
|
241
262
|
const renderSections = (data:{item:string, index:number}) => {
|
|
242
263
|
switch(data.item){
|
|
243
264
|
case 'header':
|
|
@@ -252,6 +273,12 @@ const EngageModule = ({ view_mode, insets, init_engagement, onBracketRoom, onSel
|
|
|
252
273
|
/>
|
|
253
274
|
)
|
|
254
275
|
case 'toggle':
|
|
276
|
+
let toggles = [
|
|
277
|
+
{key:'competitions', label: 'Competitions'},
|
|
278
|
+
{key:'brackets', label: 'Brackets'},
|
|
279
|
+
]
|
|
280
|
+
if(poll_campaigns.length > 0){ toggles.push({ key: 'polls', label: 'Predict / Trivia' }) }
|
|
281
|
+
if(squares_competitions.length > 0){ toggles.push({ key: 'squares', label: 'Squares' }) }
|
|
255
282
|
return (
|
|
256
283
|
<View transparent style={{ margin:10 }}>
|
|
257
284
|
{onManage && view_mode == 'mobile' ?
|
|
@@ -265,11 +292,7 @@ const EngageModule = ({ view_mode, insets, init_engagement, onBracketRoom, onSel
|
|
|
265
292
|
<Toggle
|
|
266
293
|
background_color={Colors.views.header}
|
|
267
294
|
inactive_title_color={Colors.text.h1}
|
|
268
|
-
options={
|
|
269
|
-
{key:'competitions', label: 'Competitions'},
|
|
270
|
-
{key:'brackets', label: 'Brackets'},
|
|
271
|
-
{key:'squares', label: 'Squares'}
|
|
272
|
-
]}
|
|
295
|
+
options={toggles}
|
|
273
296
|
selected_option={active_tab}
|
|
274
297
|
onSelectOption={(option) => setActiveTab(option as any)}
|
|
275
298
|
/>
|
|
@@ -365,6 +388,22 @@ const EngageModule = ({ view_mode, insets, init_engagement, onBracketRoom, onSel
|
|
|
365
388
|
})}
|
|
366
389
|
</View>
|
|
367
390
|
</View>
|
|
391
|
+
:active_tab == 'polls' ?
|
|
392
|
+
<View transparent>
|
|
393
|
+
<View transparent style={{ marginBottom:15, marginTop:10 }}>
|
|
394
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
395
|
+
<View transparent style={{ flex:1 }}>
|
|
396
|
+
<Text theme='h1'>Prediction / Trivia Games</Text>
|
|
397
|
+
<Text style={{ marginTop:3 }} theme='description'>Below are available prediction or trivia games.</Text>
|
|
398
|
+
</View>
|
|
399
|
+
</View>
|
|
400
|
+
</View>
|
|
401
|
+
<View style={{ flexDirection:'row', flexWrap:'wrap', justifyContent:'center' }}>
|
|
402
|
+
{poll_campaigns.sort((a,b) => moment(b.create_datetime).unix() - moment(a.create_datetime).unix()).map((c, i) => {
|
|
403
|
+
return renderPollCampaigns({ item: c, index: i })
|
|
404
|
+
})}
|
|
405
|
+
</View>
|
|
406
|
+
</View>
|
|
368
407
|
:active_tab == 'brackets' ?
|
|
369
408
|
<View transparent>
|
|
370
409
|
<View transparent>
|
|
@@ -1,25 +1,40 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { Button, Text, View } from "../../Components/Themed"
|
|
3
3
|
import type { AthleteProps, GolfLeaderProps, MarketProps, OrderProps } from '../../types';
|
|
4
4
|
import { AthleteImage } from '../../Components/Jerseys';
|
|
5
5
|
import { useColors } from '../../constants/useColors';
|
|
6
6
|
import { GolfHelpers } from '../api';
|
|
7
7
|
import { FlatList } from 'react-native';
|
|
8
|
-
import { Icons } from '../../Components';
|
|
8
|
+
import { Icons, Toggle } from '../../Components';
|
|
9
9
|
|
|
10
10
|
type LeaderBetsListProps = {
|
|
11
11
|
golf_leader:GolfLeaderProps,
|
|
12
12
|
athlete:AthleteProps,
|
|
13
13
|
orders:OrderProps[],
|
|
14
|
+
max_height?:number,
|
|
14
15
|
markets:MarketProps[],
|
|
15
16
|
active_round?:number,
|
|
16
17
|
onClose:() => void
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
const LeaderBetsList = ({ golf_leader, athlete, orders, markets, active_round, onClose }:LeaderBetsListProps) => {
|
|
19
|
+
const sections = ['header','toggle','list']
|
|
20
|
+
const LeaderBetsList = ({ golf_leader, athlete, orders, markets, max_height, active_round, onClose }:LeaderBetsListProps) => {
|
|
20
21
|
const Colors = useColors();
|
|
22
|
+
const [ active_toggle, setActiveToggle ] = useState('active');
|
|
21
23
|
const current_hole = GolfHelpers.getCurrentHole(golf_leader, active_round);
|
|
22
24
|
let leader_orders = orders.filter(o => o.side_id == athlete.athlete_id);
|
|
25
|
+
if(active_toggle == 'active'){
|
|
26
|
+
leader_orders = leader_orders.filter(o => o.resolution_status == 'inprogress');
|
|
27
|
+
} else {
|
|
28
|
+
leader_orders = leader_orders.filter(o => o.resolution_status == 'closed')
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
let filtered_orders = orders.filter(o => o.side_id == athlete.athlete_id);
|
|
33
|
+
let is_active = filtered_orders.find(o => o.resolution_status == 'inprogress');
|
|
34
|
+
if(is_active){ setActiveToggle('active') }
|
|
35
|
+
else { setActiveToggle('closed') }
|
|
36
|
+
},[orders.length])
|
|
37
|
+
|
|
23
38
|
const getIcon = (result_ind?:string) => {
|
|
24
39
|
switch(result_ind){
|
|
25
40
|
case 'win': return <Icons.CheckIcon size={16} color={Colors.text.success} />
|
|
@@ -56,7 +71,7 @@ const LeaderBetsList = ({ golf_leader, athlete, orders, markets, active_round, o
|
|
|
56
71
|
<Text theme='light' style={{ marginTop:3 }}>Bet</Text>
|
|
57
72
|
</View>
|
|
58
73
|
<View float style={{ padding:5, justifyContent:'center', alignItems:'center', marginLeft:10 }}>
|
|
59
|
-
<Text theme='h1' color={getColor(order_stats.result_ind)}>${order_stats.
|
|
74
|
+
<Text theme='h1' color={getColor(order_stats.result_ind)}>${order_stats.winnings.toFixed(2)}</Text>
|
|
60
75
|
<Text theme='light' color={getColor(order_stats.result_ind)} style={{ marginTop:3 }}>Winnings</Text>
|
|
61
76
|
</View>
|
|
62
77
|
</View>
|
|
@@ -75,13 +90,13 @@ const LeaderBetsList = ({ golf_leader, athlete, orders, markets, active_round, o
|
|
|
75
90
|
</View>
|
|
76
91
|
)
|
|
77
92
|
}
|
|
78
|
-
|
|
79
93
|
const order_stats = GolfHelpers.calcAllOrderStats(leader_orders);
|
|
80
94
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
95
|
+
const renderSections = (data:{ item:string, index:number }) => {
|
|
96
|
+
switch(data.item){
|
|
97
|
+
case 'header':
|
|
98
|
+
return (
|
|
99
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
|
|
85
100
|
<AthleteImage
|
|
86
101
|
athlete={athlete}
|
|
87
102
|
size={16}
|
|
@@ -101,14 +116,47 @@ const LeaderBetsList = ({ golf_leader, athlete, orders, markets, active_round, o
|
|
|
101
116
|
onPress={() => onClose()}
|
|
102
117
|
/>
|
|
103
118
|
</View>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
119
|
+
)
|
|
120
|
+
case 'toggle':
|
|
121
|
+
return (
|
|
122
|
+
<View style={{ padding:10 }}>
|
|
123
|
+
<Toggle
|
|
124
|
+
options={[
|
|
125
|
+
{ key: 'active', label: 'Active' },
|
|
126
|
+
{ key: 'closed', label: 'Closed' }
|
|
127
|
+
]}
|
|
128
|
+
onSelectOption={(option) => setActiveToggle(option)}
|
|
129
|
+
selected_option={active_toggle}
|
|
130
|
+
/>
|
|
131
|
+
</View>
|
|
132
|
+
)
|
|
133
|
+
case 'list':
|
|
134
|
+
return (
|
|
135
|
+
<View>
|
|
136
|
+
<FlatList
|
|
137
|
+
data={leader_orders}
|
|
138
|
+
renderItem={renderOrders}
|
|
139
|
+
key={'leader_bets_list'}
|
|
140
|
+
keyExtractor={(item) => item.order_id.toString()}
|
|
141
|
+
/>
|
|
142
|
+
</View>
|
|
143
|
+
)
|
|
144
|
+
default: return <></>
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<View type='blur' style={{ position:'absolute', top:0, left:0, right:0, bottom:0, justifyContent:'flex-end' }}>
|
|
151
|
+
<View float style={{ maxHeight:max_height }}>
|
|
152
|
+
<FlatList
|
|
153
|
+
key='betlistsections'
|
|
154
|
+
keyExtractor={item => item}
|
|
155
|
+
renderItem={renderSections}
|
|
156
|
+
data={sections}
|
|
157
|
+
/>
|
|
158
|
+
|
|
159
|
+
|
|
112
160
|
</View>
|
|
113
161
|
</View>
|
|
114
162
|
)
|