be-components 1.5.9 → 1.6.1
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/Checkout/index.js +8 -6
- package/lib/commonjs/Checkout/index.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/AthleteSelector.js +50 -1
- package/lib/commonjs/CompetitionManager/components/AthleteSelector.js.map +1 -1
- package/lib/commonjs/Components/Icons.js +90 -0
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Engage/components/BracketCompetitionCard.js +3 -1
- package/lib/commonjs/Engage/components/BracketCompetitionCard.js.map +1 -1
- package/lib/commonjs/Engage/components/CompetitionCard.js +3 -1
- package/lib/commonjs/Engage/components/CompetitionCard.js.map +1 -1
- package/lib/commonjs/Engage/components/SquaresCompetitionCard.js +3 -1
- package/lib/commonjs/Engage/components/SquaresCompetitionCard.js.map +1 -1
- package/lib/commonjs/LocationTracker/LocationStatus.js +39 -2
- package/lib/commonjs/LocationTracker/LocationStatus.js.map +1 -1
- package/lib/commonjs/LocationTracker/api/index.js +55 -1
- package/lib/commonjs/LocationTracker/api/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/api/index.js +213 -0
- package/lib/commonjs/MarketComponents/api/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/components/AthleteMarket/index.js +179 -0
- package/lib/commonjs/MarketComponents/components/AthleteMarket/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/components/EventMarket/index.js +205 -0
- package/lib/commonjs/MarketComponents/components/EventMarket/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/components/MarketButton/api/index.js +179 -0
- package/lib/commonjs/MarketComponents/components/MarketButton/api/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/components/MarketButton/index.js +58 -0
- package/lib/commonjs/MarketComponents/components/MarketButton/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/api/index.js +48 -0
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/api/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js +479 -0
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/index.js +12 -0
- package/lib/commonjs/MarketComponents/index.js.map +1 -0
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/Checkout/index.js +8 -6
- package/lib/module/Checkout/index.js.map +1 -1
- package/lib/module/CompetitionManager/components/AthleteSelector.js +50 -1
- package/lib/module/CompetitionManager/components/AthleteSelector.js.map +1 -1
- package/lib/module/Components/Icons.js +90 -0
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Engage/components/BracketCompetitionCard.js +3 -1
- package/lib/module/Engage/components/BracketCompetitionCard.js.map +1 -1
- package/lib/module/Engage/components/CompetitionCard.js +3 -1
- package/lib/module/Engage/components/CompetitionCard.js.map +1 -1
- package/lib/module/Engage/components/SquaresCompetitionCard.js +3 -1
- package/lib/module/Engage/components/SquaresCompetitionCard.js.map +1 -1
- package/lib/module/LocationTracker/LocationStatus.js +39 -2
- package/lib/module/LocationTracker/LocationStatus.js.map +1 -1
- package/lib/module/LocationTracker/api/index.js +55 -1
- package/lib/module/LocationTracker/api/index.js.map +1 -1
- package/lib/module/MarketComponents/api/index.js +207 -0
- package/lib/module/MarketComponents/api/index.js.map +1 -0
- package/lib/module/MarketComponents/components/AthleteMarket/index.js +172 -0
- package/lib/module/MarketComponents/components/AthleteMarket/index.js.map +1 -0
- package/lib/module/MarketComponents/components/EventMarket/index.js +198 -0
- package/lib/module/MarketComponents/components/EventMarket/index.js.map +1 -0
- package/lib/module/MarketComponents/components/MarketButton/api/index.js +172 -0
- package/lib/module/MarketComponents/components/MarketButton/api/index.js.map +1 -0
- package/lib/module/MarketComponents/components/MarketButton/index.js +51 -0
- package/lib/module/MarketComponents/components/MarketButton/index.js.map +1 -0
- package/lib/module/MarketComponents/components/TeamEventMarket/api/index.js +42 -0
- package/lib/module/MarketComponents/components/TeamEventMarket/api/index.js.map +1 -0
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js +470 -0
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js.map +1 -0
- package/lib/module/MarketComponents/index.js +5 -0
- package/lib/module/MarketComponents/index.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/AthleteSelector.d.ts.map +1 -1
- package/lib/typescript/src/Components/Icons.d.ts +3 -0
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/Engage/components/BracketCompetitionCard.d.ts.map +1 -1
- package/lib/typescript/src/LocationTracker/LocationStatus.d.ts +7 -1
- package/lib/typescript/src/LocationTracker/LocationStatus.d.ts.map +1 -1
- package/lib/typescript/src/LocationTracker/api/index.d.ts +12 -1
- package/lib/typescript/src/LocationTracker/api/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/api/index.d.ts +22 -0
- package/lib/typescript/src/MarketComponents/api/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/components/AthleteMarket/index.d.ts +25 -0
- package/lib/typescript/src/MarketComponents/components/AthleteMarket/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/components/EventMarket/index.d.ts +21 -0
- package/lib/typescript/src/MarketComponents/components/EventMarket/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/components/MarketButton/api/index.d.ts +15 -0
- package/lib/typescript/src/MarketComponents/components/MarketButton/api/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/components/MarketButton/index.d.ts +12 -0
- package/lib/typescript/src/MarketComponents/components/MarketButton/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/api/index.d.ts +10 -0
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/api/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts +25 -0
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/index.d.ts +25 -0
- package/lib/typescript/src/MarketComponents/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Checkout/index.tsx +2 -1
- package/src/CompetitionManager/components/AthleteSelector.tsx +36 -0
- package/src/Components/Icons.tsx +50 -0
- package/src/Engage/components/BracketCompetitionCard.tsx +2 -2
- package/src/Engage/components/CompetitionCard.tsx +1 -1
- package/src/Engage/components/SquaresCompetitionCard.tsx +1 -1
- package/src/LocationTracker/LocationStatus.tsx +34 -3
- package/src/LocationTracker/api/index.tsx +39 -3
- package/src/MarketComponents/api/index.ts +143 -0
- package/src/MarketComponents/components/AthleteMarket/index.tsx +109 -0
- package/src/MarketComponents/components/EventMarket/index.tsx +115 -0
- package/src/MarketComponents/components/MarketButton/api/index.ts +152 -0
- package/src/MarketComponents/components/MarketButton/index.tsx +37 -0
- package/src/MarketComponents/components/TeamEventMarket/api/index.ts +35 -0
- package/src/MarketComponents/components/TeamEventMarket/index.tsx +295 -0
- package/src/MarketComponents/index.tsx +5 -0
- package/src/index.tsx +2 -0
- package/src/types.d.ts +88 -2
- package/lib/commonjs/Markets/api/index.js +0 -28
- package/lib/commonjs/Markets/api/index.js.map +0 -1
- package/lib/commonjs/Markets/components/MarketButton.js +0 -25
- package/lib/commonjs/Markets/components/MarketButton.js.map +0 -1
- package/lib/module/Markets/api/index.js +0 -23
- package/lib/module/Markets/api/index.js.map +0 -1
- package/lib/module/Markets/components/MarketButton.js +0 -18
- package/lib/module/Markets/components/MarketButton.js.map +0 -1
- package/lib/typescript/src/Markets/api/index.d.ts +0 -7
- package/lib/typescript/src/Markets/api/index.d.ts.map +0 -1
- package/lib/typescript/src/Markets/components/MarketButton.d.ts +0 -11
- package/lib/typescript/src/Markets/components/MarketButton.d.ts.map +0 -1
- package/src/Markets/api/index.ts +0 -18
- package/src/Markets/components/MarketButton.tsx +0 -24
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AthleteProps, EventOrderStatProps, EventProps, MarketProps, MarketSideOptionProps, MatchProps, OrderProps, TeamProps, TournamentProps } from "../../types";
|
|
2
|
+
export { MarketComponentApi, MarketComponentHelpers };
|
|
3
|
+
declare const MarketComponentApi: {
|
|
4
|
+
setEnvironment: () => void;
|
|
5
|
+
getAthletesByTeamId: (team_id: string) => Promise<AthleteProps[]>;
|
|
6
|
+
};
|
|
7
|
+
declare const MarketComponentHelpers: {
|
|
8
|
+
getLiqudity: (event_order_stats: EventOrderStatProps[]) => {
|
|
9
|
+
liquidity: number;
|
|
10
|
+
open_order_count: number;
|
|
11
|
+
};
|
|
12
|
+
getVar1Label: (market: MarketProps, var_1: number, side?: string) => string;
|
|
13
|
+
getOddsLabel: (odds: number, decimals?: number) => string;
|
|
14
|
+
getTeamEventSideIds: (event: EventProps, market: MarketProps, side_option: MarketSideOptionProps, athlete?: AthleteProps, team?: TeamProps) => {
|
|
15
|
+
side_id: any;
|
|
16
|
+
reversed_side_id: any;
|
|
17
|
+
} | undefined;
|
|
18
|
+
getOrderTitleForTeamEvent: (order: OrderProps, market: MarketProps, event: EventProps, athlete?: AthleteProps, exotic?: any) => string | undefined;
|
|
19
|
+
getOrderTitleForTournament: (order: OrderProps, market: MarketProps, tournament: TournamentProps, athlete?: AthleteProps, team?: TeamProps) => string | undefined;
|
|
20
|
+
getOrderTitleForMatch: (order: OrderProps, market: MarketProps, match: MatchProps, athlete?: AthleteProps, team?: TeamProps) => string | undefined;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/MarketComponents/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAIxK,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,CAAA;AAErD,QAAA,MAAM,kBAAkB;;mCAOe,MAAM,KAAE,QAAQ,YAAY,EAAE,CAAC;CASrE,CAAA;AAGD,QAAA,MAAM,sBAAsB;qCACQ,mBAAmB,EAAE,KAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAC,MAAM,CAAA;KAAE;2BAK/E,WAAW,SAAQ,MAAM,SAAQ,MAAM;yBAOzC,MAAM,aAAY,MAAM;iCAMjB,UAAU,UAAS,WAAW,eAAc,qBAAqB,YAAW,YAAY,SAAQ,SAAS;;;;uCAyBjG,UAAU,UAAS,WAAW,SAAQ,UAAU,YAAW,YAAY,WAAU,GAAG,KAAE,MAAM,GAAG,SAAS;wCAyBvG,UAAU,UAAS,WAAW,cAAa,eAAe,YAAW,YAAY,SAAQ,SAAS,KAAE,MAAM,GAAG,SAAS;mCAuB3H,UAAU,UAAS,WAAW,SAAQ,UAAU,YAAW,YAAY,SAAQ,SAAS,KAAE,MAAM,GAAG,SAAS;CAuB9I,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AthleteProps, BestAvailableOrderProps, EventOrderStatProps, EventProps, MarketProps, OrderProps, TradeProps } from "../../../types";
|
|
3
|
+
type AthleteMarketProps = {
|
|
4
|
+
event: EventProps;
|
|
5
|
+
event_type: 'team' | 'tournament' | 'match';
|
|
6
|
+
athlete: AthleteProps;
|
|
7
|
+
hide_stat_banner?: boolean;
|
|
8
|
+
width?: number;
|
|
9
|
+
market: MarketProps;
|
|
10
|
+
latest_trades: TradeProps[];
|
|
11
|
+
best_available_orders: BestAvailableOrderProps[];
|
|
12
|
+
event_order_stats: EventOrderStatProps[];
|
|
13
|
+
default_price_view: 'last_trade' | 'best_available';
|
|
14
|
+
onOrder: (order: OrderProps) => void;
|
|
15
|
+
onView: (data: {
|
|
16
|
+
event_id: string;
|
|
17
|
+
event_type: string;
|
|
18
|
+
market_id: string;
|
|
19
|
+
side_type: 'athlete';
|
|
20
|
+
side_id: string;
|
|
21
|
+
}) => void;
|
|
22
|
+
};
|
|
23
|
+
declare const AthleteMarket: ({ event, hide_stat_banner, width, athlete, market, event_order_stats, default_price_view, latest_trades, best_available_orders, onOrder, onView }: AthleteMarketProps) => React.JSX.Element;
|
|
24
|
+
export default AthleteMarket;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/MarketComponents/components/AthleteMarket/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,UAAU,EAAE,WAAW,EAAyB,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AASxK,KAAK,kBAAkB,GAAG;IACtB,KAAK,EAAC,UAAU,CAAC;IACjB,UAAU,EAAC,MAAM,GAAC,YAAY,GAAC,OAAO,CAAC;IACvC,OAAO,EAAC,YAAY,CAAC;IACrB,gBAAgB,CAAC,EAAC,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAC,MAAM,CAAC;IACd,MAAM,EAAC,WAAW,CAAC;IACnB,aAAa,EAAC,UAAU,EAAE,CAAC;IAC3B,qBAAqB,EAAC,uBAAuB,EAAE,CAAC;IAChD,iBAAiB,EAAC,mBAAmB,EAAE,CAAC;IACxC,kBAAkB,EAAC,YAAY,GAAC,gBAAgB,CAAC;IACjD,OAAO,EAAC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,CAAC;IACnC,MAAM,EAAC,CAAC,IAAI,EAAC;QAAC,QAAQ,EAAC,MAAM,CAAC;QAAC,UAAU,EAAC,MAAM,CAAC;QAAC,SAAS,EAAC,MAAM,CAAC;QAAC,SAAS,EAAC,SAAS,CAAC;QAAC,OAAO,EAAC,MAAM,CAAA;KAAC,KAAK,IAAI,CAAA;CACpH,CAAA;AAED,QAAA,MAAM,aAAa,sJAAsJ,kBAAkB,sBAgF1L,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BestAvailableOrderProps, EventOrderStatProps, EventProps, MarketProps, OrderProps, TradeProps } from '../../../types';
|
|
3
|
+
type EventMarketProps = {
|
|
4
|
+
event: EventProps;
|
|
5
|
+
width?: number;
|
|
6
|
+
market: MarketProps;
|
|
7
|
+
hide_market_banner?: boolean;
|
|
8
|
+
latest_trades: TradeProps[];
|
|
9
|
+
best_available_orders: BestAvailableOrderProps[];
|
|
10
|
+
event_order_stats: EventOrderStatProps[];
|
|
11
|
+
default_price_view: 'last_trade' | 'best_available';
|
|
12
|
+
onOrder: (order: OrderProps) => void;
|
|
13
|
+
onView: (data: {
|
|
14
|
+
event_id: string;
|
|
15
|
+
event_type: string;
|
|
16
|
+
market_id: string;
|
|
17
|
+
}) => void;
|
|
18
|
+
};
|
|
19
|
+
declare const EventMarket: ({ width, event, market, latest_trades, best_available_orders, hide_market_banner, event_order_stats, default_price_view, onOrder, onView }: EventMarketProps) => React.JSX.Element;
|
|
20
|
+
export default EventMarket;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/MarketComponents/components/EventMarket/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,UAAU,EAAE,WAAW,EAAyB,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAS3J,KAAK,gBAAgB,GAAG;IACpB,KAAK,EAAC,UAAU,CAAC;IACjB,KAAK,CAAC,EAAC,MAAM,CAAC;IACd,MAAM,EAAC,WAAW,CAAC;IACnB,kBAAkB,CAAC,EAAC,OAAO,CAAC;IAC5B,aAAa,EAAC,UAAU,EAAE,CAAC;IAC3B,qBAAqB,EAAC,uBAAuB,EAAE,CAAC;IAChD,iBAAiB,EAAC,mBAAmB,EAAE,CAAC;IACxC,kBAAkB,EAAC,YAAY,GAAC,gBAAgB,CAAC;IACjD,OAAO,EAAC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,CAAC;IACnC,MAAM,EAAC,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAC,MAAM,CAAC;QAAC,UAAU,EAAC,MAAM,CAAC;QAAC,SAAS,EAAC,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CAClF,CAAA;AAED,QAAA,MAAM,WAAW,+IAA+I,gBAAgB,sBAwF/K,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BestAvailableOrderProps, MarketProps, MarketSideOptionProps, OrderProps, TradeProps } from "../../../../types";
|
|
2
|
+
export declare const MarketButtonHelpers: {
|
|
3
|
+
getButtonLabel: (market: MarketProps, side_option: MarketSideOptionProps, trade: TradeProps) => {
|
|
4
|
+
var_1: string;
|
|
5
|
+
odds: string;
|
|
6
|
+
color: string;
|
|
7
|
+
};
|
|
8
|
+
getVisibleTrade: (default_price_view: 'best_available' | 'last_trade', market: MarketProps, side_option: MarketSideOptionProps, latest_trades: TradeProps[], best_available_orders: BestAvailableOrderProps[], side_id: string, reversed_side_id: string) => TradeProps | undefined;
|
|
9
|
+
reverseBAOrder: (order: BestAvailableOrderProps, market: MarketProps, side_id: string) => BestAvailableOrderProps | undefined;
|
|
10
|
+
getTradeFromMarket: (market: MarketProps, event_id: string, event_type: 'match' | 'tournament' | 'team', side: string, side_type: string, side_id: string, reversed_side_id: string) => TradeProps;
|
|
11
|
+
getTradeFromAvailableOrder: (ba: BestAvailableOrderProps, reversed_side_id: string) => TradeProps;
|
|
12
|
+
reverseTradeFromOrder: (order: BestAvailableOrderProps, market: MarketProps) => TradeProps;
|
|
13
|
+
getOrderFromTrade: (trade: TradeProps, unit_size?: number) => OrderProps;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/MarketComponents/components/MarketButton/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,WAAW,EAAE,qBAAqB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI7H,eAAO,MAAM,mBAAmB;6BACJ,WAAW,eAAc,qBAAqB,SAAQ,UAAU;;;;;0CAKnD,gBAAgB,GAAC,YAAY,UAAS,WAAW,eAAc,qBAAqB,iBAAgB,UAAU,EAAE,yBAAwB,uBAAuB,EAAE,WAAU,MAAM,oBAAmB,MAAM;4BAqBxN,uBAAuB,UAAS,WAAW,WAAU,MAAM,KAAE,uBAAuB,GAAG,SAAS;iCAgB3F,WAAW,YAAW,MAAM,cAAc,OAAO,GAAC,YAAY,GAAC,MAAM,QAAO,MAAM,aAAY,MAAM,WAAU,MAAM,oBAAmB,MAAM,KAAE,UAAU;qCAsBpJ,uBAAuB,oBAAmB,MAAM,KAAE,UAAU;mCAsB/D,uBAAuB,UAAS,WAAW,KAAE,UAAU;+BAoB3D,UAAU,cAAa,MAAM,KAAE,UAAU;CAsCtE,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MarketProps, MarketSideOptionProps, OrderProps, TradeProps } from '../../../types';
|
|
3
|
+
type MarketButtonProps = {
|
|
4
|
+
market: MarketProps;
|
|
5
|
+
side_option: MarketSideOptionProps;
|
|
6
|
+
side_label?: string;
|
|
7
|
+
trade: TradeProps;
|
|
8
|
+
onPress: (order: OrderProps) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const MarketCard: ({ side_option, market, trade, side_label, onPress }: MarketButtonProps) => React.JSX.Element;
|
|
11
|
+
export default MarketCard;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/MarketComponents/components/MarketButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIjG,KAAK,iBAAiB,GAAG;IACrB,MAAM,EAAC,WAAW,CAAC;IACnB,WAAW,EAAC,qBAAqB,CAAC;IAClC,UAAU,CAAC,EAAC,MAAM,CAAC;IACnB,KAAK,EAAC,UAAU,CAAC;IACjB,OAAO,EAAE,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,CAAA;CACtC,CAAA;AACD,QAAA,MAAM,UAAU,wDAAwD,iBAAiB,sBAoBxF,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AthleteProps, EventOrderStatProps, EventProps, MarketProps, TradeProps } from "../../../../types";
|
|
2
|
+
export { TeamEventMarketHelpers };
|
|
3
|
+
declare const TeamEventMarketHelpers: {
|
|
4
|
+
getPrimaryMarkets: (event: EventProps, markets: MarketProps[]) => MarketProps[];
|
|
5
|
+
getNonPrimaryMarkets: (event: EventProps, markets: MarketProps[]) => MarketProps[];
|
|
6
|
+
getTimeDetail: (event: EventProps) => string | undefined;
|
|
7
|
+
sortNonPrimaryMarkets: (markets: MarketProps[], event_order_stats: EventOrderStatProps[]) => EventOrderStatProps[];
|
|
8
|
+
sortAthleteMarkets: (market: MarketProps, event_order_stats: EventOrderStatProps[], latest_trades: TradeProps[], athletes: AthleteProps[]) => AthleteProps[];
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/MarketComponents/components/TeamEventMarket/api/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE/G,OAAQ,EAAE,sBAAsB,EAAE,CAAA;AAClC,QAAA,MAAM,sBAAsB;+BACE,UAAU,WAAU,WAAW,EAAE,KAAE,WAAW,EAAE;kCAK9C,UAAU,WAAU,WAAW,EAAE,KAAE,WAAW,EAAE;2BAKtD,UAAU;qCAIA,WAAW,EAAE,qBAAoB,mBAAmB,EAAE;iCAI1D,WAAW,qBAAoB,mBAAmB,EAAE,iBAAgB,UAAU,EAAE,YAAW,YAAY,EAAE,KAAE,YAAY,EAAE;CAWxJ,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BestAvailableOrderProps, CompetitionProps, EventOrderStatProps, EventProps, MarketProps, OrderProps, TradeProps } from '../../../types';
|
|
3
|
+
type TeamEventMarketProps = {
|
|
4
|
+
event: EventProps;
|
|
5
|
+
markets: MarketProps[];
|
|
6
|
+
competition?: CompetitionProps;
|
|
7
|
+
latest_trades: TradeProps[];
|
|
8
|
+
best_available_orders: BestAvailableOrderProps[];
|
|
9
|
+
event_order_stats: EventOrderStatProps[];
|
|
10
|
+
default_price_view: 'last_trade' | 'best_available';
|
|
11
|
+
onView: (data: {
|
|
12
|
+
event_id: string;
|
|
13
|
+
event_type: string;
|
|
14
|
+
market_id: string;
|
|
15
|
+
side_type?: string;
|
|
16
|
+
side_id?: string;
|
|
17
|
+
}) => void;
|
|
18
|
+
onOrder: (order: OrderProps) => void;
|
|
19
|
+
onExpand?: (expanded: boolean) => void;
|
|
20
|
+
onCompetitionSelect: (competition_id: string) => void;
|
|
21
|
+
onViewAdditionalMarkets: (event_id: string, event_type: string) => void;
|
|
22
|
+
};
|
|
23
|
+
declare const TeamEventMarket: ({ event, competition, markets, latest_trades, best_available_orders, event_order_stats, default_price_view, onCompetitionSelect, onExpand, onOrder, onView, onViewAdditionalMarkets }: TeamEventMarketProps) => React.JSX.Element;
|
|
24
|
+
export default TeamEventMarket;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/MarketComponents/components/TeamEventMarket/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAgB,uBAAuB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,EAAE,WAAW,EAAyB,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAa3L,KAAK,oBAAoB,GAAG;IACxB,KAAK,EAAC,UAAU,CAAC;IACjB,OAAO,EAAC,WAAW,EAAE,CAAC;IACtB,WAAW,CAAC,EAAC,gBAAgB,CAAC;IAC9B,aAAa,EAAC,UAAU,EAAE,CAAC;IAC3B,qBAAqB,EAAC,uBAAuB,EAAE,CAAC;IAChD,iBAAiB,EAAC,mBAAmB,EAAE,CAAC;IACxC,kBAAkB,EAAE,YAAY,GAAC,gBAAgB,CAAC;IAClD,MAAM,EAAC,CAAC,IAAI,EAAC;QAAE,QAAQ,EAAC,MAAM,CAAC;QAAC,UAAU,EAAC,MAAM,CAAC;QAAC,SAAS,EAAC,MAAM,CAAC;QAAC,SAAS,CAAC,EAAC,MAAM,CAAC;QAAC,OAAO,CAAC,EAAC,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACnH,OAAO,EAAC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAC,CAAC,QAAQ,EAAC,OAAO,KAAK,IAAI,CAAC;IACrC,mBAAmB,EAAC,CAAC,cAAc,EAAC,MAAM,KAAK,IAAI,CAAC;IACpD,uBAAuB,EAAE,CAAC,QAAQ,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,KAAK,IAAI,CAAA;CACxE,CAAA;AACD,QAAA,MAAM,eAAe,0LAA0L,oBAAoB,sBAuQlO,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
TeamEventMarket: ({ event, competition, markets, latest_trades, best_available_orders, event_order_stats, default_price_view, onCompetitionSelect, onExpand, onOrder, onView, onViewAdditionalMarkets }: {
|
|
4
|
+
event: import("../types").EventProps;
|
|
5
|
+
markets: import("../types").MarketProps[];
|
|
6
|
+
competition?: import("../types").CompetitionProps | undefined;
|
|
7
|
+
latest_trades: import("../types").TradeProps[];
|
|
8
|
+
best_available_orders: import("../types").BestAvailableOrderProps[];
|
|
9
|
+
event_order_stats: import("../types").EventOrderStatProps[];
|
|
10
|
+
default_price_view: "best_available" | "last_trade";
|
|
11
|
+
onView: (data: {
|
|
12
|
+
event_id: string;
|
|
13
|
+
event_type: string;
|
|
14
|
+
market_id: string;
|
|
15
|
+
side_type?: string | undefined;
|
|
16
|
+
side_id?: string | undefined;
|
|
17
|
+
}) => void;
|
|
18
|
+
onOrder: (order: import("../types").OrderProps) => void;
|
|
19
|
+
onExpand?: ((expanded: boolean) => void) | undefined;
|
|
20
|
+
onCompetitionSelect: (competition_id: string) => void;
|
|
21
|
+
onViewAdditionalMarkets: (event_id: string, event_type: string) => void;
|
|
22
|
+
}) => import("react").JSX.Element;
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/MarketComponents/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA,wBAEC"}
|
|
@@ -25,5 +25,6 @@ import EngageModule from "./Engage";
|
|
|
25
25
|
import SeasonManager from "./CompetitionSeasonManager";
|
|
26
26
|
import SeasonModule from "./CompetitionSeason";
|
|
27
27
|
import CreateSeasonForm from "./CompetitionSeasonManager/components/CreateSeasonForm";
|
|
28
|
-
|
|
28
|
+
import MarketComponents from './MarketComponents';
|
|
29
|
+
export { Authenticator, Observer, BEEventApi, BELinkApi, ProfileManager, CompetitionManager, Components, SocialComponents, APIOverrides, LinearGradient, usePlayerLocation, BettorSearch, Colors, MyWallet, Checkout, MarketComponents, PollCampaign, PollCampaignApi, PollApi, CompetitionModule, SeasonManager, CreateCompetitionForm, CreateSeasonForm, SeasonModule, AdminCompetitionList, AdServer, AdProvider, BracketRoom, SquaresModule, SocketManager, PromotedOrder, EngageModule };
|
|
29
30
|
//# 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;AAC9C,OAAO,KAAK,UAAU,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;AAC5C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,qBAAqB,MAAM,uDAAuD,CAAC;AAC1F,OAAO,oBAAoB,MAAM,sDAAsD,CAAC;AACxF,OAAO,YAAY,MAAM,UAAU,CAAC;AACpC,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,gBAAgB,MAAM,wDAAwD,CAAC;
|
|
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;AAC9C,OAAO,KAAK,UAAU,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;AAC5C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,qBAAqB,MAAM,uDAAuD,CAAC;AAC1F,OAAO,oBAAoB,MAAM,sDAAsD,CAAC;AACxF,OAAO,YAAY,MAAM,UAAU,CAAC;AACpC,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,gBAAgB,MAAM,wDAAwD,CAAC;AACtF,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,EACL,aAAa,EACb,QAAQ,EACR,UAAU,EACV,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACb,CAAA"}
|
package/package.json
CHANGED
package/src/Checkout/index.tsx
CHANGED
|
@@ -37,7 +37,6 @@ const Checkout = ({ item_order, height, account_id, onCancel, onCompleteOrder, o
|
|
|
37
37
|
});
|
|
38
38
|
const [ cvv, setCVV ] = useState<string>();
|
|
39
39
|
const [ show_location, setShowLocation ] = useState(false);
|
|
40
|
-
const { permission, location, getLocation, checkPermissions } = usePlayerLocation();
|
|
41
40
|
const [ checkout_data, setCheckoutData ] = useState<{
|
|
42
41
|
loaded:boolean,
|
|
43
42
|
player?:MyPlayerProps,
|
|
@@ -60,6 +59,8 @@ const Checkout = ({ item_order, height, account_id, onCancel, onCompleteOrder, o
|
|
|
60
59
|
const [ draft_order, setDraftOrder ] = useState<ItemOrderProps>();
|
|
61
60
|
const { loaded, player, accounts, items, player_addresses , selected_account, billing_address, shipping_address } = checkout_data;
|
|
62
61
|
const { ip_item_order, ip_transaction } = checkout;
|
|
62
|
+
|
|
63
|
+
const { permission, location, getLocation, checkPermissions } = usePlayerLocation({ player_id: player?.player_id });
|
|
63
64
|
|
|
64
65
|
const shipping_address_required = CheckoutHelpers.isShippingRequired(items);
|
|
65
66
|
const billing_address_required = CheckoutHelpers.isBillingAddressRequired(items, selected_account);
|
|
@@ -98,6 +98,42 @@ const AthleteSelector = ({ width, height, event, tournament, match, filtered_ath
|
|
|
98
98
|
</View>
|
|
99
99
|
<ScrollView style={{ flex:1 }}>
|
|
100
100
|
<View style={{ ...view_styles.section_body }}>
|
|
101
|
+
{event?.away && event?.home ?
|
|
102
|
+
<View style={{ ...view_styles.body_row, margin:10, backgroundColor:Colors.shades.white, borderRadius:22, borderWidth:4, borderColor:Colors.shades.shade100}}>
|
|
103
|
+
<Button
|
|
104
|
+
title={event.away.abbr}
|
|
105
|
+
title_color={event_side == 'away' ? Colors.shades.white : Colors.brand.midnight}
|
|
106
|
+
title_weight={event_side == 'away' ? 'bold' : 'regular'}
|
|
107
|
+
padding={15}
|
|
108
|
+
title_size={12}
|
|
109
|
+
style={{flex:1}}
|
|
110
|
+
borderRadiusOverride={{
|
|
111
|
+
borderTopLeftRadius: 22,
|
|
112
|
+
borderBottomLeftRadius:22,
|
|
113
|
+
borderTopRightRadius:0,
|
|
114
|
+
borderBottomRightRadius:0
|
|
115
|
+
}}
|
|
116
|
+
backgroundColor={event_side == 'away' ? Colors.brand.midnight : Colors.shades.white}
|
|
117
|
+
onPress={() => setSelectorData({ ...selector_data, event_side: 'away' })}
|
|
118
|
+
/>
|
|
119
|
+
<Button
|
|
120
|
+
title={event.home.abbr}
|
|
121
|
+
style={{flex:1}}
|
|
122
|
+
title_size={12}
|
|
123
|
+
title_color={event_side == 'home' ? Colors.shades.white : Colors.brand.midnight}
|
|
124
|
+
title_weight={event_side == 'home' ? 'bold' : 'regular'}
|
|
125
|
+
padding={15}
|
|
126
|
+
borderRadiusOverride={{
|
|
127
|
+
borderTopLeftRadius: 0,
|
|
128
|
+
borderBottomLeftRadius:0,
|
|
129
|
+
borderTopRightRadius:22,
|
|
130
|
+
borderBottomRightRadius:22
|
|
131
|
+
}}
|
|
132
|
+
backgroundColor={event_side == 'home' ? Colors.brand.midnight : Colors.shades.white}
|
|
133
|
+
onPress={() => setSelectorData({ ...selector_data, event_side: 'home' })}
|
|
134
|
+
/>
|
|
135
|
+
</View>
|
|
136
|
+
:<></>}
|
|
101
137
|
<View style={{ marginTop:0 }}>
|
|
102
138
|
<SearchBox
|
|
103
139
|
onChange={(text) => setSearchValue(text)}
|
package/src/Components/Icons.tsx
CHANGED
|
@@ -38,6 +38,22 @@ const PodiumIcon = ({ color, size, secondary_color }:IconProps) => {
|
|
|
38
38
|
)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
const FlameIcon = ({ size, color }:IconProps) => {
|
|
42
|
+
const ratio = 0.857
|
|
43
|
+
const height = size??30
|
|
44
|
+
const width = height * ratio
|
|
45
|
+
return (
|
|
46
|
+
<svg width={`${width}px`} height={`${height}px`} viewBox="0 0 18 21" version="1.1" xmlns="http://www.w3.org/2000/svg" >
|
|
47
|
+
<title>flame-svgrepo-com</title>
|
|
48
|
+
<g id="ss" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
49
|
+
<g id="flame-svgrepo-com" transform="translate(1.000000, 1.000000)" stroke={color??Colors.brand.midnight} stroke-width="2">
|
|
50
|
+
<path d="M15.060385,11.624539 C15.060385,15.6291895 12.5960354,17.3865482 10.6917438,17.9790802 C10.2856782,18.1054933 10.0187329,17.6320325 10.2616757,17.283008 C11.0903734,16.092014 12.048308,14.2750727 12.048308,12.5658131 C12.048308,10.7297639 10.5007593,8.56210386 9.29235166,7.22511819 C9.01608773,6.9194865 8.53424953,7.12176629 8.51918915,7.53347957 C8.4692075,8.89757394 8.25393812,10.7226102 7.32574777,12.1529703 C7.17636757,12.3832059 6.85925234,12.4022197 6.68897586,12.1869503 C6.39896932,11.8202299 6.10896279,11.3671006 5.81895625,11.009134 C5.66270475,10.8163611 5.38036019,10.8137255 5.20017209,10.9842844 C4.49764278,11.6494828 3.51408669,12.6868609 3.51408669,13.9777242 C3.51408669,14.9089266 3.95785976,16.0679174 4.41530013,16.9654222 C4.62303931,17.3729938 4.23765348,17.8510669 3.84173478,17.6218667 C2.11370621,16.6215748 0,14.5489834 0,11.624539 C0,8.66291432 4.05716417,4.56012659 5.60627537,0.68405413 C5.85067718,0.0724142449 6.60407294,-0.214984964 7.12798609,0.184152889 C10.3012092,2.60140116 15.060385,7.27406444 15.060385,11.624539 Z" id="Path"></path>
|
|
51
|
+
</g>
|
|
52
|
+
</g>
|
|
53
|
+
</svg>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
|
|
41
57
|
const UnbidSquare = ({ color, secondary_color }:IconProps) => {
|
|
42
58
|
return (
|
|
43
59
|
<svg width="45" height="45" viewBox="0 0 50 51" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1129,10 +1145,42 @@ const SelectorIcon = ({ color, size }:IconProps) => {
|
|
|
1129
1145
|
)
|
|
1130
1146
|
}
|
|
1131
1147
|
|
|
1148
|
+
const LiquidityIcon = ({ color, size }:IconProps) => {
|
|
1149
|
+
const ratio = 0.65
|
|
1150
|
+
let width = size ?? 20
|
|
1151
|
+
let height = width * ratio
|
|
1152
|
+
|
|
1153
|
+
return (
|
|
1154
|
+
<svg width={`${width}px`} height={`${height}px`} viewBox="0 0 18 17" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
1155
|
+
<title>exchange-dollar-svgrepo-com</title>
|
|
1156
|
+
<g id="ss" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
1157
|
+
<g id="exchange-dollar-svgrepo-com" transform="translate(0.000000, 0.000000)" fill={color??Colors.brand.midnight} fill-rule="nonzero">
|
|
1158
|
+
<path d="M15.773049,12.4927553 C14.0612582,15.1274121 10.9789335,16.532799 7.86733523,16.0973679 C4.75573693,15.6619368 2.17759358,13.4644349 1.25477308,10.4610957 C1.19184557,10.2633235 1.15588699,10.0565617 1.11093877,9.84979984 C0.809350943,9.92615094 0.489724403,9.84114389 0.26591218,9.62505873 C0.0957268356,9.45626323 0,9.22649163 0,8.98679396 C0,8.74709629 0.0957268356,8.5173247 0.26591218,8.3485292 L1.16487664,7.44956474 C1.33367214,7.2793794 1.56344373,7.18365256 1.8031414,7.18365256 C2.04283907,7.18365256 2.27261066,7.2793794 2.44140616,7.44956474 L3.34037062,8.3485292 C3.51055596,8.5173247 3.6062828,8.74709629 3.6062828,8.98679396 C3.6062828,9.22649163 3.51055596,9.45626323 3.34037062,9.62505873 C3.22860907,9.72404371 3.09673444,9.79764815 2.9538159,9.8408102 C2.94985586,9.87064484 2.94985586,9.90087199 2.9538159,9.93070664 C3.76632497,12.5835598 6.2203864,14.391239 8.99485705,14.3805807 C11.1210172,14.3788188 13.1025131,13.303536 14.2627888,11.5218737 C14.4275544,11.2330323 14.738309,11.0587382 15.0706897,11.0687433 C15.4030705,11.0787483 15.702779,11.2714181 15.8498731,11.5696469 C15.9969672,11.8678756 15.9674172,12.2229442 15.773049,12.4927553 L15.773049,12.4927553 Z M17.7238019,6.55060029 C17.4962805,6.33458773 17.1726027,6.25281649 16.8697857,6.33484882 C16.8248375,6.12808699 16.7978685,5.91233552 16.734941,5.71456334 C15.8121205,2.71122411 13.2339772,0.513722236 10.1223789,0.0782911427 C7.01078057,-0.357139951 3.92845589,1.04824689 2.21666505,3.68290367 C1.9798217,4.09810056 2.10931386,4.62603855 2.51139649,4.88452024 C2.91347912,5.14300193 3.44752956,5.04162704 3.72692534,4.65378528 C4.88720097,2.87212299 6.8686969,1.79684022 8.99485705,1.79507831 C11.7717,1.80230249 14.2155523,3.628799 15.0089293,6.28990059 C15.0128893,6.31973524 15.0128893,6.34996239 15.0089293,6.37979704 C14.8651823,6.42098669 14.7328922,6.49482304 14.6223745,6.59554851 C14.4521892,6.76434401 14.3564624,6.99411561 14.3564624,7.23381327 C14.3564624,7.47351094 14.4521892,7.70328254 14.6223745,7.87207804 L15.521339,8.77104249 C15.6901345,8.94122784 15.9199061,9.03695467 16.1596038,9.03695467 C16.3993014,9.03695467 16.629073,8.94122784 16.7978685,8.77104249 L17.696833,7.87207804 C17.8848351,7.70568518 17.9946899,7.46825545 17.9998126,7.21724723 C18.0049352,6.966239 17.9048587,6.72452496 17.7238019,6.55060029 Z" id="secondary"></path>
|
|
1159
|
+
<path d="M9.44433928,7.18886505 L8.54537482,7.18886505 C8.29713264,7.18886505 8.09589259,6.987625 8.09589259,6.73938282 C8.09589259,6.49114064 8.29713264,6.28990059 8.54537482,6.28990059 L10.792786,6.28990059 C11.2892703,6.28990059 11.6917504,5.8874205 11.6917504,5.39093614 C11.6917504,4.89445178 11.2892703,4.49197168 10.792786,4.49197168 L9.8938215,4.49197168 C9.8938215,3.99548732 9.49134141,3.59300723 8.99485705,3.59300723 C8.49837269,3.59300723 8.09589259,3.99548732 8.09589259,4.49197168 L8.09589259,4.5369199 C6.96436928,4.76668252 6.19104593,5.81647644 6.30708325,6.96524587 C6.42312057,8.1140153 7.39076037,8.98795435 8.54537482,8.98679396 L9.44433928,8.98679396 C9.69258146,8.98679396 9.8938215,9.18803401 9.8938215,9.43627619 C9.8938215,9.68451837 9.69258146,9.88575842 9.44433928,9.88575842 L7.19692814,9.88575842 C6.70044378,9.88575842 6.29796368,10.2882385 6.29796368,10.7847229 C6.29796368,11.2812072 6.70044378,11.6836873 7.19692814,11.6836873 L8.09589259,11.6836873 C8.09589259,12.1801717 8.49837269,12.5826518 8.99485705,12.5826518 C9.49134141,12.5826518 9.8938215,12.1801717 9.8938215,11.6836873 C11.1350324,11.5595662 12.0406126,10.452746 11.9164915,9.21153508 C11.7923704,7.9703242 10.6855502,7.06474399 9.44433928,7.18886505 Z" id="primary"></path>
|
|
1160
|
+
</g>
|
|
1161
|
+
</g>
|
|
1162
|
+
</svg>
|
|
1163
|
+
)
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
const PickEmIcon = ({ color, size }:IconProps) => {
|
|
1167
|
+
return (
|
|
1168
|
+
<svg width={`${size ?? 18}`} height={`${size ?? 18}`} viewBox="0 0 25 25" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
1169
|
+
<title>select-category-svgrepo-com</title>
|
|
1170
|
+
<g id="ss" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
1171
|
+
<g id="select-category-svgrepo-com" transform="translate(0.666667, 0.666667)" fill={color??Colors.brand.midnight} fill-rule="nonzero">
|
|
1172
|
+
<path d="M10.8,20.4 L10.8,16.8 C10.8,14.8117749 9.1882251,13.2 7.2,13.2 L3.6,13.2 C1.6117749,13.2 0,14.8117749 0,16.8 L0,20.4 C0,22.3882251 1.6117749,24 3.6,24 L7.2,24 C9.1882251,24 10.8,22.3882251 10.8,20.4 Z M1.2,20.4 L1.2,16.8 C1.2,15.4745166 2.2745166,14.4 3.6,14.4 L7.2,14.4 C8.5254834,14.4 9.6,15.4745166 9.6,16.8 L9.6,20.4 C9.6,21.7254834 8.5254834,22.8 7.2,22.8 L3.6,22.8 C2.2745166,22.8 1.2,21.7254834 1.2,20.4 Z M24,16.8 C24,14.8117749 22.3882251,13.2 20.4,13.2 L16.8,13.2 C14.8117749,13.2 13.2,14.8117749 13.2,16.8 L13.2,20.4 C13.2,22.3882251 14.8117749,24 16.8,24 L20.4,24 C22.3882251,24 24,22.3882251 24,20.4 L24,16.8 Z M22.8,20.4 C22.8,21.7254834 21.7254834,22.8 20.4,22.8 L16.8,22.8 C15.4745166,22.8 14.4,21.7254834 14.4,20.4 L14.4,16.8 C14.4,15.4745166 15.4745166,14.4 16.8,14.4 L20.4,14.4 C21.7254834,14.4 22.8,15.4745166 22.8,16.8 L22.8,20.4 Z M24,3.6 C24,1.6117749 22.3882251,0 20.4,0 L16.8,0 C14.8117749,0 13.2,1.6117749 13.2,3.6 L13.2,7.2 C13.2,9.1882251 14.8117749,10.8 16.8,10.8 L20.4,10.8 C22.3882251,10.8 24,9.1882251 24,7.2 L24,3.6 Z M22.8,7.2 C22.8,8.5254834 21.7254834,9.6 20.4,9.6 L16.8,9.6 C15.4745166,9.6 14.4,8.5254834 14.4,7.2 L14.4,3.6 C14.4,2.2745166 15.4745166,1.2 16.8,1.2 L20.4,1.2 C21.7254834,1.2 22.8,2.2745166 22.8,3.6 L22.8,7.2 Z M0,3.6 L0,7.2 C0,9.1882251 1.6117749,10.8 3.6,10.8 L7.2,10.8 C9.1882251,10.8 10.8,9.1882251 10.8,7.2 L10.8,3.6 C10.8,1.6117749 9.1882251,0 7.2,0 L3.6,0 C1.6117749,0 0,1.6117749 0,3.6 Z M1.2,3.6 C1.2,2.2745166 2.2745166,1.2 3.6,1.2 L7.2,1.2 C8.5254834,1.2 9.6,2.2745166 9.6,3.6 L9.6,7.2 C9.6,8.5254834 8.5254834,9.6 7.2,9.6 L3.6,9.6 C2.2745166,9.6 1.2,8.5254834 1.2,7.2 L1.2,3.6 Z M9,17.0856 L4.8684,21.2016 L2.682,19.0152 L3.5676,18.1296 L4.8684,19.4352 L8.1144,16.2 L9,17.0856 Z M21.744,3.8016 L17.6124,7.9176 L15.426,5.7312 L16.3116,4.8456 L17.6124,6.1512 L20.8584,2.916 L21.744,3.8016 Z" id="Shape"></path>
|
|
1173
|
+
</g>
|
|
1174
|
+
</g>
|
|
1175
|
+
</svg>
|
|
1176
|
+
)
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1132
1179
|
|
|
1133
1180
|
|
|
1134
1181
|
export default {
|
|
1135
1182
|
SearchIcon,
|
|
1183
|
+
LiquidityIcon,
|
|
1136
1184
|
EyeOnIcon,
|
|
1137
1185
|
AlertIcon,
|
|
1138
1186
|
PieIcon,
|
|
@@ -1140,6 +1188,7 @@ export default {
|
|
|
1140
1188
|
SquaresIcon,
|
|
1141
1189
|
EditIcon,
|
|
1142
1190
|
PreferencesIcon,
|
|
1191
|
+
PickEmIcon,
|
|
1143
1192
|
CheckCirlceIcon,
|
|
1144
1193
|
ShareIcon,
|
|
1145
1194
|
TrophyIcon,
|
|
@@ -1185,6 +1234,7 @@ export default {
|
|
|
1185
1234
|
DiscoverCardIcon,
|
|
1186
1235
|
AmexCardIcon,
|
|
1187
1236
|
TransactionIcon,
|
|
1237
|
+
FlameIcon,
|
|
1188
1238
|
TransactionSuccessIcon,
|
|
1189
1239
|
TransactionErrorIcon,
|
|
1190
1240
|
VisaCardIcon,
|
|
@@ -16,7 +16,7 @@ type BracketCompetitionCardProps = {
|
|
|
16
16
|
bracket?:BracketProps,
|
|
17
17
|
onCompetitionSelect:(c:BracketCompetitionProps) => void
|
|
18
18
|
}
|
|
19
|
-
const BracketCompetitionCard = ({ bracket_competition, bracket, league, company, admin, onCompetitionSelect}:BracketCompetitionCardProps) => {
|
|
19
|
+
const BracketCompetitionCard = ({ bracket_competition, bracket, league, company, admin, onCompetitionSelect }:BracketCompetitionCardProps) => {
|
|
20
20
|
const cl = bracket_competition.market_type == 'FOR_MONEY' ? '$' : 'E'
|
|
21
21
|
let current_payout = bracket_competition.ticket_revenue
|
|
22
22
|
if(bracket_competition.promo_payout){ current_payout += bracket_competition.promo_payout }
|
|
@@ -26,7 +26,7 @@ const BracketCompetitionCard = ({ bracket_competition, bracket, league, company,
|
|
|
26
26
|
const is_live = moment().isAfter(moment(bracket_competition.scheduled_datetime)) ? true : false
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
|
-
<TouchableOpacity style={{ ...view_styles.section, padding:0 }} onPress={() => onCompetitionSelect(bracket_competition)}>
|
|
29
|
+
<TouchableOpacity style={{ ...view_styles.section, padding:0, borderWidth:1, borderColor:Colors.shades.shade600 }} onPress={() => onCompetitionSelect(bracket_competition)}>
|
|
30
30
|
<View style={{ ...view_styles.section_header, backgroundColor:Colors.shades.shade100 }}>
|
|
31
31
|
<Image
|
|
32
32
|
source={{ uri: bracket_competition.image?.url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
@@ -32,7 +32,7 @@ const CompetitionCard = ({ competition, competition_type, company, admin, onComp
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
return (
|
|
35
|
-
<TouchableOpacity style={{ ...view_styles.section, padding:0 }} onPress={() => onCompetitionSelect(competition)}>
|
|
35
|
+
<TouchableOpacity style={{ ...view_styles.section, padding:0, borderWidth:1, borderColor:Colors.shades.shade600 }} onPress={() => onCompetitionSelect(competition)}>
|
|
36
36
|
<View style={{ ...view_styles.section_header, backgroundColor:Colors.shades.shade100 }}>
|
|
37
37
|
<Image
|
|
38
38
|
source={{ uri: competition.image?.url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
@@ -19,7 +19,7 @@ const SquaresCompetitionCard = ({ squares_competition, admin, event, company, on
|
|
|
19
19
|
if(squares_competition.guaranteed_payout && squares_competition.guaranteed_payout > current_payout){ current_payout = squares_competition.guaranteed_payout }
|
|
20
20
|
const is_live = moment().isAfter(moment(squares_competition.begin_datetime)) ? true : false
|
|
21
21
|
return (
|
|
22
|
-
<TouchableOpacity style={{ ...view_styles.section, padding:0 }} onPress={() => onSelectCompetition(squares_competition)}>
|
|
22
|
+
<TouchableOpacity style={{ ...view_styles.section, padding:0, borderWidth:1, borderColor:Colors.shades.shade600 }} onPress={() => onSelectCompetition(squares_competition)}>
|
|
23
23
|
<View style={{ ...view_styles.section_header, backgroundColor:Colors.shades.shade100 }}>
|
|
24
24
|
<Image
|
|
25
25
|
source={{ uri: squares_competition.image?.url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
|
|
@@ -2,11 +2,17 @@ import { useEffect, useState } from 'react';
|
|
|
2
2
|
import { LocationApi, LocationHelpers } from './api';
|
|
3
3
|
import type { LocationProps, PlayerAddressProps } from '../types';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type UsePlayerLocationProps = {
|
|
6
|
+
player_id?:string,
|
|
7
|
+
distinct_id?:string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const usePlayerLocation = ({ player_id, distinct_id }:UsePlayerLocationProps) => {
|
|
6
11
|
const [ location, setLocation ] = useState<{
|
|
7
12
|
loading: boolean,
|
|
8
13
|
error?:string,
|
|
9
14
|
coordinates:any,
|
|
15
|
+
player_id?:string,
|
|
10
16
|
address_results:any[],
|
|
11
17
|
player_address?:PlayerAddressProps,
|
|
12
18
|
region?:string,
|
|
@@ -59,10 +65,31 @@ export const usePlayerLocation = () => {
|
|
|
59
65
|
checked:true,
|
|
60
66
|
permission: 'granted'
|
|
61
67
|
})
|
|
62
|
-
const addresses = await LocationApi.reverseCoordLookup(coordinates.latitude, coordinates.longitude);
|
|
63
68
|
const locations = await LocationApi.getLocations();
|
|
69
|
+
|
|
70
|
+
//OK! First we are going to try and compare to the players last location
|
|
71
|
+
//If the user is within a mile, then we will use their last one for this
|
|
72
|
+
const { last_location, distance } = await LocationApi.compareLastLocation({ anonymous_id:distinct_id, player_id: player_id ?? '0', coordinates:coordinates, player_location_id: '', create_datetime: '' })
|
|
73
|
+
if(last_location && last_location.player_address && distance < 5){
|
|
74
|
+
const gen_addy = LocationHelpers.getAddressFromLastLocation(last_location, locations);
|
|
75
|
+
if(gen_addy){
|
|
76
|
+
let last_loc = {
|
|
77
|
+
loading: false,
|
|
78
|
+
coordinates: coordinates,
|
|
79
|
+
address_results: [],
|
|
80
|
+
player_address: gen_addy?.player_address,
|
|
81
|
+
region: gen_addy.region,
|
|
82
|
+
location: gen_addy.location
|
|
83
|
+
};
|
|
84
|
+
LocationApi.cache_location(last_loc)
|
|
85
|
+
return setLocation(last_loc)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
//Shoot! Couldnt get it - lets now get a new one!
|
|
90
|
+
const addresses = await LocationApi.reverseCoordLookup(coordinates.latitude, coordinates.longitude);
|
|
64
91
|
const generated_address = LocationHelpers.getAddressFromGeoCodeResults(addresses, locations);
|
|
65
|
-
|
|
92
|
+
|
|
66
93
|
let new_loc = {
|
|
67
94
|
loading:false,
|
|
68
95
|
coordinates: coordinates,
|
|
@@ -73,6 +100,10 @@ export const usePlayerLocation = () => {
|
|
|
73
100
|
}
|
|
74
101
|
LocationApi.cache_location(new_loc)
|
|
75
102
|
setLocation(new_loc)
|
|
103
|
+
if(generated_address){
|
|
104
|
+
const player_location = LocationHelpers.genPlayerLocationFromAddress(coordinates, generated_address?.player_address, generated_address?.region, player_id, distinct_id)
|
|
105
|
+
LocationApi.savePlayerLocation(player_location)
|
|
106
|
+
}
|
|
76
107
|
}
|
|
77
108
|
|
|
78
109
|
} catch (e) {
|
|
@@ -3,12 +3,13 @@ import { Platform } from 'react-native';
|
|
|
3
3
|
import Geolocation from '@react-native-community/geolocation';
|
|
4
4
|
|
|
5
5
|
import { APIOverrides } from "../../ApiOverrides";
|
|
6
|
-
import type { LocationProps, PlayerAddressProps } from "../../types";
|
|
6
|
+
import type { LocationProps, PlayerAddressProps, PlayerLocationProps } from "../../types";
|
|
7
7
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
8
8
|
import moment from "moment-mini";
|
|
9
9
|
|
|
10
10
|
let LOCATION_API = ''
|
|
11
11
|
let AUTH_SVC_API = ''
|
|
12
|
+
let SOCIAL_SVC_API = ''
|
|
12
13
|
|
|
13
14
|
export { LocationApi, LocationHelpers }
|
|
14
15
|
|
|
@@ -17,11 +18,30 @@ const LocationApi = {
|
|
|
17
18
|
const endpoints = APIOverrides.getEndpoints();
|
|
18
19
|
LOCATION_API = endpoints['LOCATION_API'] as string;
|
|
19
20
|
AUTH_SVC_API = endpoints['AUTH_SVC_API'] as string;
|
|
21
|
+
SOCIAL_SVC_API = endpoints['SOCIAL_SVC_API'] as string;
|
|
20
22
|
},
|
|
21
23
|
getLocations: async() => {
|
|
22
24
|
const resp = await axios.get(`${AUTH_SVC_API}/v1/locations/all`)
|
|
23
25
|
return resp.data.locations
|
|
24
26
|
},
|
|
27
|
+
compareLastLocation: async(player_location:PlayerLocationProps):Promise<{ last_location?:PlayerLocationProps, distance:number }> => {
|
|
28
|
+
try {
|
|
29
|
+
const resp = await axios.post(`${SOCIAL_SVC_API}/v1/locations/player/compare`, { player_location })
|
|
30
|
+
return { distance: resp.data.distance, last_location: resp.data.last_location }
|
|
31
|
+
} catch (e) {
|
|
32
|
+
console.log(e)
|
|
33
|
+
return { distance:99999999, last_location: undefined }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
savePlayerLocation: async(player_location:PlayerLocationProps):Promise<PlayerLocationProps | undefined> => {
|
|
37
|
+
try {
|
|
38
|
+
const resp = await axios.post(`${SOCIAL_SVC_API}/v1/locations/player/create`, { player_location });
|
|
39
|
+
return resp.data.player_location;
|
|
40
|
+
} catch (e) {
|
|
41
|
+
console.log(e);
|
|
42
|
+
return undefined
|
|
43
|
+
}
|
|
44
|
+
},
|
|
25
45
|
getPermission: async():Promise<'denied'|'prompt'|'granted'> => {
|
|
26
46
|
if(Platform.OS == 'web' && navigator?.permissions){
|
|
27
47
|
let permissions = await navigator.permissions.query({ name: "geolocation" })
|
|
@@ -38,7 +58,6 @@ const LocationApi = {
|
|
|
38
58
|
if(cached_location){
|
|
39
59
|
let parsed_loc = JSON.parse(cached_location)
|
|
40
60
|
let diff = moment().diff(parsed_loc.cached_at, 'minutes')
|
|
41
|
-
console.log(diff)
|
|
42
61
|
if(diff > 10){ return undefined }
|
|
43
62
|
return parsed_loc
|
|
44
63
|
}
|
|
@@ -110,5 +129,22 @@ const LocationHelpers = {
|
|
|
110
129
|
const my_location = locations.find(l => l.value == state_component.short_name)
|
|
111
130
|
|
|
112
131
|
return { player_address, region: state_component.long_name, location:my_location }
|
|
113
|
-
}
|
|
132
|
+
},
|
|
133
|
+
getAddressFromLastLocation: (player_location:PlayerLocationProps, locations:LocationProps[]):{ player_address: PlayerAddressProps, region: string, location?:LocationProps } | undefined => {
|
|
134
|
+
if(!player_location.player_address || !player_location.region){ return undefined }
|
|
135
|
+
let location = locations.find(l => l.label.toLowerCase() == player_location.region?.toLowerCase())
|
|
136
|
+
if(!location){ return undefined }
|
|
137
|
+
return { player_address: player_location.player_address, region: player_location.region, location }
|
|
138
|
+
},
|
|
139
|
+
genPlayerLocationFromAddress: (coordinates: any, player_address:PlayerAddressProps, region:string, player_id?:string, distinct_id?:string):PlayerLocationProps => {
|
|
140
|
+
return {
|
|
141
|
+
player_location_id: '',
|
|
142
|
+
player_id:player_id ?? '0',
|
|
143
|
+
anonymous_id: distinct_id,
|
|
144
|
+
player_address,
|
|
145
|
+
region,
|
|
146
|
+
coordinates,
|
|
147
|
+
create_datetime:''
|
|
148
|
+
}
|
|
149
|
+
}
|
|
114
150
|
}
|