be-components 6.5.6 → 6.5.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/Guide/GuideButton.js +48 -0
- package/lib/commonjs/Guide/GuideButton.js.map +1 -0
- package/lib/commonjs/Guide/api/index.js +33 -0
- package/lib/commonjs/Guide/api/index.js.map +1 -0
- package/lib/commonjs/Guide/index.js +15 -13
- package/lib/commonjs/Guide/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js +28 -3
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/commonjs/types.d.js +2 -0
- package/lib/commonjs/types.d.js.map +1 -1
- package/lib/module/Guide/GuideButton.js +41 -0
- package/lib/module/Guide/GuideButton.js.map +1 -0
- package/lib/module/Guide/api/index.js +27 -0
- package/lib/module/Guide/api/index.js.map +1 -0
- package/lib/module/Guide/index.js +15 -13
- package/lib/module/Guide/index.js.map +1 -1
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js +28 -3
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/module/types.d.js +2 -0
- package/lib/module/types.d.js.map +1 -1
- package/lib/typescript/lib/commonjs/Guide/GuideButton.d.ts +10 -0
- package/lib/typescript/lib/commonjs/Guide/GuideButton.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Guide/api/index.d.ts +6 -0
- package/lib/typescript/lib/commonjs/Guide/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Guide/index.d.ts +3 -1
- package/lib/typescript/lib/commonjs/Guide/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Guide/GuideButton.d.ts +10 -0
- package/lib/typescript/lib/module/Guide/GuideButton.d.ts.map +1 -0
- package/lib/typescript/lib/module/Guide/api/index.d.ts +5 -0
- package/lib/typescript/lib/module/Guide/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/Guide/index.d.ts +3 -1
- package/lib/typescript/lib/module/Guide/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/TeamEventMarket/index.d.ts +2 -2
- package/lib/typescript/src/Guide/GuideButton.d.ts +12 -0
- package/lib/typescript/src/Guide/GuideButton.d.ts.map +1 -0
- package/lib/typescript/src/Guide/api/index.d.ts +13 -0
- package/lib/typescript/src/Guide/api/index.d.ts.map +1 -0
- package/lib/typescript/src/Guide/index.d.ts +5 -3
- package/lib/typescript/src/Guide/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts +3 -3
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/index.d.ts +2 -2
- package/lib/typescript/src/MarketComponents/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Guide/GuideButton.tsx +34 -0
- package/src/Guide/api/index.ts +33 -0
- package/src/Guide/index.tsx +16 -15
- package/src/MarketComponents/components/TeamEventMarket/index.tsx +19 -9
- package/src/types.d.ts +61 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default GuideButton;
|
|
2
|
+
declare function GuideButton({ client_native_id, onError, onHelp, show_label, label }: {
|
|
3
|
+
client_native_id: any;
|
|
4
|
+
onError: any;
|
|
5
|
+
onHelp: any;
|
|
6
|
+
show_label: any;
|
|
7
|
+
label: any;
|
|
8
|
+
}): React.FunctionComponentElement<any>;
|
|
9
|
+
import React from 'react';
|
|
10
|
+
//# sourceMappingURL=GuideButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuideButton.d.ts","sourceRoot":"","sources":["../../../../module/Guide/GuideButton.js"],"names":[],"mappings":";AAKA;;;;;;wCAiCC;kBAtCiB,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../module/Guide/api/index.js"],"names":[],"mappings":";IASkB,gCAMf;IACkB,yDAQlB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export default function GuideWrapper({ children, guide }: {
|
|
1
|
+
export default function GuideWrapper({ active, children, guide, onComplete }: {
|
|
2
|
+
active: any;
|
|
2
3
|
children: any;
|
|
3
4
|
guide: any;
|
|
5
|
+
onComplete: any;
|
|
4
6
|
}): React.FunctionComponentElement<{
|
|
5
7
|
children?: React.ReactNode | undefined;
|
|
6
8
|
}> | React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> | React.FunctionComponentElement<React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Guide/index.js"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Guide/index.js"],"names":[],"mappings":"AAKA;;;;;;;8JAwOC;kBA7OkD,OAAO"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare const _default: React.MemoExoticComponent<({ event,
|
|
1
|
+
declare const _default: React.MemoExoticComponent<({ event, show_help, parlays, hide_non_primary, disabled_markets, flash_markets, league, float, style, init_expanded, hot_markets_direction, show_id, hide_liquidity, show_podcasts, activate_loading, competitions, squares_competitions, show_grades, markets, latest_trades, best_available_orders, event_order_stats, default_price_view, onSetMarket, onTeamSelect, onFlashSelect, onParlaySelect, onSquaresSelect, onCompetitionSelect, onExpand, onOrder, onViewMarketStats, onView, onViewAdditionalMarkets, onTradeLongPress, onTVSelect, onActivate, onEvent, onShare, onPodcastSelect }: {
|
|
2
2
|
event: any;
|
|
3
|
-
|
|
3
|
+
show_help: any;
|
|
4
4
|
parlays: any;
|
|
5
5
|
hide_non_primary: any;
|
|
6
6
|
disabled_markets: any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GuideResponseProps } from '../types';
|
|
3
|
+
type GuideButtonProps = {
|
|
4
|
+
client_native_id: string;
|
|
5
|
+
show_label?: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
onError: () => void;
|
|
8
|
+
onHelp: (guide: GuideResponseProps) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const GuideButton: ({ client_native_id, onError, onHelp, show_label, label }: GuideButtonProps) => React.JSX.Element;
|
|
11
|
+
export default GuideButton;
|
|
12
|
+
//# sourceMappingURL=GuideButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuideButton.d.ts","sourceRoot":"","sources":["../../../../src/Guide/GuideButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,KAAK,gBAAgB,GAAG;IACpB,gBAAgB,EAAC,MAAM,CAAC;IACxB,UAAU,CAAC,EAAC,OAAO,CAAC;IACpB,KAAK,CAAC,EAAC,MAAM,CAAC;IACd,OAAO,EAAC,MAAM,IAAI,CAAC;IACnB,MAAM,EAAC,CAAC,KAAK,EAAC,kBAAkB,KAAK,IAAI,CAAA;CAC5C,CAAA;AAED,QAAA,MAAM,WAAW,GAAI,0DAAyD,gBAAgB,sBAgB7F,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HelpPromptProps, HelpTourProps } from "../../types";
|
|
2
|
+
export { HelpApi };
|
|
3
|
+
declare const HelpApi: {
|
|
4
|
+
setEnvironment: () => void;
|
|
5
|
+
getHelpByNativeId: (native_id: string) => Promise<undefined | {
|
|
6
|
+
view_type: "prompt" | "tour";
|
|
7
|
+
help_prompt: HelpPromptProps;
|
|
8
|
+
help_tour: HelpTourProps;
|
|
9
|
+
tour_prompts: HelpPromptProps[];
|
|
10
|
+
active_tour_prompt: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Guide/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOlE,OAAO,EAAE,OAAO,EAAE,CAAA;AAIlB,QAAA,MAAM,OAAO;;mCAQ0B,MAAM,KAAE,OAAO,CAAC,SAAS,GAAG;QAAC,SAAS,EAAC,QAAQ,GAAC,MAAM,CAAC;QAAC,WAAW,EAAC,eAAe,CAAC;QAAC,SAAS,EAAC,aAAa,CAAC;QAAC,YAAY,EAAC,eAAe,EAAE,CAAC;QAAC,kBAAkB,EAAC,MAAM,GAAC,SAAS,CAAA;KAAC,CAAC;CAUzN,CAAA"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GuideResponseProps } from "../types";
|
|
3
3
|
export type GuideWrapperProps = {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
-
|
|
5
|
+
active?: boolean;
|
|
6
|
+
guide?: GuideResponseProps;
|
|
7
|
+
onComplete: (status: 'cancelled' | 'complete') => void;
|
|
6
8
|
};
|
|
7
|
-
export default function GuideWrapper({ children, guide }: GuideWrapperProps): React.JSX.Element;
|
|
9
|
+
export default function GuideWrapper({ active, children, guide, onComplete }: GuideWrapperProps): React.JSX.Element;
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Guide/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAU3D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Guide/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAU3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAKnD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAC,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,UAAU,EAAE,CAAC,MAAM,EAAC,WAAW,GAAC,UAAU,KAAK,IAAI,CAAA;CACpD,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,iBAAiB,qBAiO9F"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { BEEventProps, BestAvailableOrderProps, CompetitionProps, EventOrderStatProps, EventProps,
|
|
2
|
+
import type { BEEventProps, BestAvailableOrderProps, CompetitionProps, EventOrderStatProps, EventProps, LeagueProps, MarketProps, OrderProps, ParlayProps, PodcastProps, PollProps, SquaresCompetitionProps, TradeProps } from '../../../types';
|
|
3
3
|
type TeamEventMarketProps = {
|
|
4
4
|
event: EventProps;
|
|
5
5
|
markets: MarketProps[];
|
|
6
6
|
parlays?: ParlayProps[];
|
|
7
7
|
init_expanded?: boolean;
|
|
8
|
-
|
|
8
|
+
show_help?: boolean;
|
|
9
9
|
onViewMarketStats?: () => void;
|
|
10
10
|
onSetMarket?: (market_id: string, side_type?: string, side_id?: string) => void;
|
|
11
11
|
league?: LeagueProps;
|
|
@@ -48,6 +48,6 @@ type TeamEventMarketProps = {
|
|
|
48
48
|
onActivate?: (event_id: string, event_type: string) => void;
|
|
49
49
|
activate_loading?: boolean;
|
|
50
50
|
};
|
|
51
|
-
declare const _default: React.MemoExoticComponent<({ event,
|
|
51
|
+
declare const _default: React.MemoExoticComponent<({ event, show_help, parlays, hide_non_primary, disabled_markets, flash_markets, league, float, style, init_expanded, hot_markets_direction, show_id, hide_liquidity, show_podcasts, activate_loading, competitions, squares_competitions, show_grades, markets, latest_trades, best_available_orders, event_order_stats, default_price_view, onSetMarket, onTeamSelect, onFlashSelect, onParlaySelect, onSquaresSelect, onCompetitionSelect, onExpand, onOrder, onViewMarketStats, onView, onViewAdditionalMarkets, onTradeLongPress, onTVSelect, onActivate, onEvent, onShare, onPodcastSelect }: TeamEventMarketProps) => React.JSX.Element>;
|
|
52
52
|
export default _default;
|
|
53
53
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/MarketComponents/components/TeamEventMarket/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,KAAK,EAAgB,YAAY,EAAE,uBAAuB,EAAgB,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/MarketComponents/components/TeamEventMarket/index.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
TeamEventMarket: import("react").MemoExoticComponent<({ event,
|
|
2
|
+
TeamEventMarket: import("react").MemoExoticComponent<({ event, show_help, parlays, hide_non_primary, disabled_markets, flash_markets, league, float, style, init_expanded, hot_markets_direction, show_id, hide_liquidity, show_podcasts, activate_loading, competitions, squares_competitions, show_grades, markets, latest_trades, best_available_orders, event_order_stats, default_price_view, onSetMarket, onTeamSelect, onFlashSelect, onParlaySelect, onSquaresSelect, onCompetitionSelect, onExpand, onOrder, onViewMarketStats, onView, onViewAdditionalMarkets, onTradeLongPress, onTVSelect, onActivate, onEvent, onShare, onPodcastSelect }: {
|
|
3
3
|
event: import("../types").EventProps;
|
|
4
4
|
markets: import("../types").MarketProps[];
|
|
5
5
|
parlays?: import("../types").ParlayProps[];
|
|
6
6
|
init_expanded?: boolean;
|
|
7
|
-
|
|
7
|
+
show_help?: boolean;
|
|
8
8
|
onViewMarketStats?: () => void;
|
|
9
9
|
onSetMarket?: (market_id: string, side_type?: string, side_id?: string) => void;
|
|
10
10
|
league?: import("../types").LeagueProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/MarketComponents/index.tsx"],"names":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/MarketComponents/index.tsx"],"names":[],"mappings":";;;;;;;;mDAsCgO,CAAC,iBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;qBAAwqB,CAAC;mBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDAvBj4B,CAAC,iBACxC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAD8B,CAAC;qBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuBwS,CAAC;mBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAhB7W,CAAA;qBACA,CAAA;;;;;;;;;;;;;AAJJ,wBAmBC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icons } from "../Components"
|
|
3
|
+
import { Button, Text } from "../Components/Themed"
|
|
4
|
+
import { useColors } from "../constants/useColors"
|
|
5
|
+
import type { GuideResponseProps } from '../types';
|
|
6
|
+
import { HelpApi } from './api';
|
|
7
|
+
|
|
8
|
+
type GuideButtonProps = {
|
|
9
|
+
client_native_id:string,
|
|
10
|
+
show_label?:boolean,
|
|
11
|
+
label?:string,
|
|
12
|
+
onError:() => void,
|
|
13
|
+
onHelp:(guide:GuideResponseProps) => void
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const GuideButton = ({ client_native_id, onError, onHelp, show_label, label }:GuideButtonProps) => {
|
|
17
|
+
const Colors = useColors();
|
|
18
|
+
const getGuide = async() => {
|
|
19
|
+
HelpApi.setEnvironment();
|
|
20
|
+
const guide_response = await HelpApi.getHelpByNativeId(client_native_id);
|
|
21
|
+
if(!guide_response){ return onError() }
|
|
22
|
+
return onHelp(guide_response);
|
|
23
|
+
}
|
|
24
|
+
return (
|
|
25
|
+
<Button transparent style={{ padding:10, flexDirection:'row', alignItems:'center' }} onPress={() => getGuide()}>
|
|
26
|
+
<Icons.AlertIcon size={18} color={Colors.text.warning} />
|
|
27
|
+
{show_label ?
|
|
28
|
+
<Text style={{ marginLeft:3 }} theme='warning'>{label ?? 'Need Help?'}</Text>
|
|
29
|
+
:<></>}
|
|
30
|
+
</Button>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default GuideButton
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { APIOverrides } from "../../ApiOverrides"
|
|
3
|
+
import type { HelpPromptProps, HelpTourProps } from "../../types";
|
|
4
|
+
|
|
5
|
+
//let EVENT_SVC_API = ''
|
|
6
|
+
let AUTH_SVC_API = ''
|
|
7
|
+
//let MK_SVC_API = ''
|
|
8
|
+
//let SOCIAL_SVC_API = ''
|
|
9
|
+
|
|
10
|
+
export { HelpApi }
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
const HelpApi = {
|
|
15
|
+
setEnvironment: () => {
|
|
16
|
+
const endpoints = APIOverrides.getEndpoints();
|
|
17
|
+
//EVENT_SVC_API = endpoints['EVENT_SVC_API'] as string;
|
|
18
|
+
//MK_SVC_API = endpoints['MK_SVC_API'] as string;
|
|
19
|
+
AUTH_SVC_API = endpoints['AUTH_SVC_API'] as string;
|
|
20
|
+
//SOCIAL_SVC_API = endpoints['SOCIAL_SVC_API'] as string;
|
|
21
|
+
},
|
|
22
|
+
getHelpByNativeId: async(native_id:string):Promise<undefined | {view_type:'prompt'|'tour', help_prompt:HelpPromptProps, help_tour:HelpTourProps, tour_prompts:HelpPromptProps[], active_tour_prompt:string|undefined}> => {
|
|
23
|
+
try {
|
|
24
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v1/help/prompts/native_id/${native_id}`);
|
|
25
|
+
return resp.data
|
|
26
|
+
} catch (e) {
|
|
27
|
+
console.log(e);
|
|
28
|
+
return undefined
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
package/src/Guide/index.tsx
CHANGED
|
@@ -8,23 +8,25 @@ import {
|
|
|
8
8
|
TouchableHighlight,
|
|
9
9
|
TouchableWithoutFeedback,
|
|
10
10
|
} from "react-native";
|
|
11
|
-
import type {
|
|
11
|
+
import type { GuideResponseProps } from "../types";
|
|
12
12
|
import { Button, Text, View } from "../Components/Themed";
|
|
13
13
|
import { useColors } from "../constants/useColors";
|
|
14
14
|
import { Icons } from "../Components";
|
|
15
15
|
|
|
16
16
|
export type GuideWrapperProps = {
|
|
17
17
|
children: React.ReactNode;
|
|
18
|
-
|
|
18
|
+
active?:boolean,
|
|
19
|
+
guide?: GuideResponseProps;
|
|
20
|
+
onComplete: (status:'cancelled'|'complete') => void
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
type Layout = { x: number; y: number; width: number; height: number };
|
|
22
24
|
|
|
23
|
-
export default function GuideWrapper({ children, guide }: GuideWrapperProps) {
|
|
25
|
+
export default function GuideWrapper({ active, children, guide, onComplete }: GuideWrapperProps) {
|
|
24
26
|
const Colors = useColors();
|
|
25
|
-
const wrapper_guid = guide ?? {};
|
|
26
|
-
const {
|
|
27
|
-
|
|
27
|
+
const wrapper_guid:GuideResponseProps = guide ?? { view_type: 'prompt' };
|
|
28
|
+
const { tour_prompts } = wrapper_guid;
|
|
29
|
+
const tour = tour_prompts ?? []
|
|
28
30
|
const refs = useRef<{ [key: string]: any }>({});
|
|
29
31
|
const containerRef = useRef<any>(null);
|
|
30
32
|
|
|
@@ -41,10 +43,10 @@ export default function GuideWrapper({ children, guide }: GuideWrapperProps) {
|
|
|
41
43
|
const { width: screenWidth } = useWindowDimensions();
|
|
42
44
|
|
|
43
45
|
const sortedTour = tour
|
|
44
|
-
? [...tour].sort((a, b) => (a.
|
|
46
|
+
? [...tour].sort((a, b) => (a.tour_priority ?? 0) - (b.tour_priority ?? 0))
|
|
45
47
|
: [];
|
|
46
48
|
const step = sortedTour[currentStep];
|
|
47
|
-
const stepRef = step ? refs.current[step.
|
|
49
|
+
const stepRef = step ? refs.current[step.client_native_id] : undefined;
|
|
48
50
|
|
|
49
51
|
const isTouchable = (child: any) => {
|
|
50
52
|
const typeName = (child.type as any)?.displayName || child.type;
|
|
@@ -56,6 +58,8 @@ export default function GuideWrapper({ children, guide }: GuideWrapperProps) {
|
|
|
56
58
|
);
|
|
57
59
|
};
|
|
58
60
|
|
|
61
|
+
|
|
62
|
+
|
|
59
63
|
// Recursively attach refs to children with nativeID
|
|
60
64
|
const attachRefs = (nodes: React.ReactNode): React.ReactNode => {
|
|
61
65
|
return React.Children.map(nodes, (child) => {
|
|
@@ -192,6 +196,7 @@ export default function GuideWrapper({ children, guide }: GuideWrapperProps) {
|
|
|
192
196
|
|
|
193
197
|
{/* Tooltip: always above overlay */}
|
|
194
198
|
<View
|
|
199
|
+
float
|
|
195
200
|
onLayout={(ev) => setTooltipHeight(ev.nativeEvent.layout.height)}
|
|
196
201
|
style={{
|
|
197
202
|
position: "absolute",
|
|
@@ -199,8 +204,6 @@ export default function GuideWrapper({ children, guide }: GuideWrapperProps) {
|
|
|
199
204
|
minWidth: 300,
|
|
200
205
|
borderColor: Colors.text.success,
|
|
201
206
|
borderWidth: 1,
|
|
202
|
-
borderRadius: 8,
|
|
203
|
-
padding: 10,
|
|
204
207
|
top: layout.y - tooltipHeight - 10, // 10px margin above overlay
|
|
205
208
|
left: right ? undefined : layout.x,
|
|
206
209
|
right: right ? 5 : undefined,
|
|
@@ -208,7 +211,7 @@ export default function GuideWrapper({ children, guide }: GuideWrapperProps) {
|
|
|
208
211
|
}}
|
|
209
212
|
>
|
|
210
213
|
{step.title && (
|
|
211
|
-
<View type='header' style={{ flexDirection: "row", alignItems: "center",
|
|
214
|
+
<View type='header' style={{ flexDirection: "row", alignItems: "center", padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
|
|
212
215
|
<Icons.AlertIcon size={14} color={Colors.text.warning} />
|
|
213
216
|
<Text theme="h1" style={{ flex: 1, marginLeft: 10, marginRight: 10 }}>
|
|
214
217
|
{step.title}
|
|
@@ -230,18 +233,16 @@ export default function GuideWrapper({ children, guide }: GuideWrapperProps) {
|
|
|
230
233
|
)}
|
|
231
234
|
|
|
232
235
|
{step.body && (
|
|
233
|
-
<View type='body' style={{ padding:
|
|
236
|
+
<View type='body' style={{ padding: 10 }}>
|
|
234
237
|
<Text theme="h2">{step.body}</Text>
|
|
235
238
|
</View>
|
|
236
239
|
)}
|
|
237
240
|
|
|
238
|
-
<View type='footer' style={{ flexDirection: "row", alignItems: "center",
|
|
241
|
+
<View type='footer' style={{ flexDirection: "row", alignItems: "center", padding: 10, borderBottomRightRadius:8,borderBottomLeftRadius:8 }}>
|
|
239
242
|
{currentStep > 0 && (
|
|
240
243
|
<Button type="action" onPress={handlePrev} style={{ flex: 1, marginRight: 5 }} title="BACK" />
|
|
241
244
|
)}
|
|
242
|
-
{!step.clickable && (
|
|
243
245
|
<Button type="success" onPress={handleNext} style={{ flex: 1 }} title={isLastStep ? "Done" : "Next"} />
|
|
244
|
-
)}
|
|
245
246
|
</View>
|
|
246
247
|
</View>
|
|
247
248
|
</View>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { Image, FlatList, ActivityIndicator, ScrollView } from 'react-native';
|
|
3
|
-
import type { AthleteProps, BEEventProps, BestAvailableOrderProps, CompanyProps, CompetitionProps, EventOrderStatProps, EventProps,
|
|
3
|
+
import type { AthleteProps, BEEventProps, BestAvailableOrderProps, CompanyProps, CompetitionProps, EventOrderStatProps, EventProps, GuideResponseProps, LeagueProps, MarketProps, MarketSideOptionProps, OrderProps, ParlayProps, PodcastProps, PollProps, SquaresCompetitionProps, TradeProps } from '../../../types';
|
|
4
4
|
import { view_styles } from '../../../constants/styles';
|
|
5
5
|
import { Icons, LinearDiagnal } from '../../../Components';
|
|
6
6
|
import {TeamEventMarketHelpers} from './api';
|
|
@@ -20,13 +20,14 @@ import { useColors } from '../../../constants/useColors';
|
|
|
20
20
|
import OrderGradeBar from '../OrderGradeBar';
|
|
21
21
|
import moment from 'moment-mini';
|
|
22
22
|
import { GuideView } from 'be-components';
|
|
23
|
+
import GuideButton from '../../../Guide/GuideButton';
|
|
23
24
|
|
|
24
25
|
type TeamEventMarketProps = {
|
|
25
26
|
event:EventProps,
|
|
26
27
|
markets:MarketProps[],
|
|
27
28
|
parlays?:ParlayProps[],
|
|
28
29
|
init_expanded?:boolean,
|
|
29
|
-
|
|
30
|
+
show_help?:boolean,
|
|
30
31
|
onViewMarketStats?:() => void,
|
|
31
32
|
onSetMarket?:(market_id:string, side_type?:string, side_id?:string) => void,
|
|
32
33
|
league?:LeagueProps,
|
|
@@ -63,9 +64,11 @@ type TeamEventMarketProps = {
|
|
|
63
64
|
onActivate?:(event_id:string, event_type:string) => void
|
|
64
65
|
activate_loading?:boolean
|
|
65
66
|
}
|
|
66
|
-
const TeamEventMarket = ({ event,
|
|
67
|
+
const TeamEventMarket = ({ event, show_help, parlays, hide_non_primary, disabled_markets, flash_markets, league, float, style, init_expanded, hot_markets_direction, show_id, hide_liquidity, show_podcasts, activate_loading, competitions, squares_competitions, show_grades, markets, latest_trades, best_available_orders, event_order_stats, default_price_view, onSetMarket, onTeamSelect, onFlashSelect, onParlaySelect, onSquaresSelect, onCompetitionSelect, onExpand, onOrder, onViewMarketStats, onView, onViewAdditionalMarkets, onTradeLongPress, onTVSelect, onActivate, onEvent, onShare, onPodcastSelect }:TeamEventMarketProps) => {
|
|
67
68
|
const C = useColors();
|
|
68
69
|
const [ market_width, setMarketWidth ] = useState(180);
|
|
70
|
+
const [ guide_response, setGuide ] = useState<{guide_active:boolean, guide?:GuideResponseProps}>({ guide_active:false });
|
|
71
|
+
const { guide_active, guide } = guide_response;
|
|
69
72
|
const [ expanded_data, setExpandedData ] = useState<{
|
|
70
73
|
expanded:boolean,
|
|
71
74
|
loaded:boolean,
|
|
@@ -410,9 +413,9 @@ const TeamEventMarket = ({ event, guide, parlays, hide_non_primary, disabled_mar
|
|
|
410
413
|
const { non_primary_markets, available } = useMemo(() => TeamEventMarketHelpers.sortNonPrimaryMarkets(TeamEventMarketHelpers.getNonPrimaryMarkets(event, markets), event_order_stats, latest_trades),[JSON.stringify(event_order_stats), JSON.stringify(latest_trades), markets.length, event.last_update_datetime])
|
|
411
414
|
const tv_link = event.info?.broadcast?.link && onTVSelect ? event.info?.broadcast?.link : undefined
|
|
412
415
|
return (
|
|
413
|
-
<GuideView guide={guide}>
|
|
416
|
+
<GuideView guide={guide} active={guide_active} onComplete={() => setGuide({ guide_active: false })}>
|
|
414
417
|
|
|
415
|
-
<View ref={ref} float={float} style={[style]}>
|
|
418
|
+
<View nativeID='team_event_market' ref={ref} float={float} style={[style]}>
|
|
416
419
|
{sponsor ?
|
|
417
420
|
<LinearGradient style={{ marginTop:-1, marginLeft:-1, marginRight:-1, padding:10, flexDirection:'row', alignItems:'center', borderTopRightRadius:8, borderTopLeftRadius:8 }} start={{x: 0, y: 0}} end={{x: 1, y: 0}} colors={[sponsor.brand_primary ?? C.text.h1, sponsor.brand_secondary ?? C.text.h1]}>
|
|
418
421
|
{onActivate && event_status != 'closed' ?
|
|
@@ -503,7 +506,14 @@ const TeamEventMarket = ({ event, guide, parlays, hide_non_primary, disabled_mar
|
|
|
503
506
|
<Text theme='light' selectable>{event.event_id}</Text>
|
|
504
507
|
:<></>}
|
|
505
508
|
</View>
|
|
506
|
-
|
|
509
|
+
{show_help ?
|
|
510
|
+
<GuideButton
|
|
511
|
+
onError={() => alert('Unable to get help')}
|
|
512
|
+
onHelp={(guide) => { setGuide({ guide_active:true, guide })}}
|
|
513
|
+
show_label
|
|
514
|
+
client_native_id='team_event_market'
|
|
515
|
+
/>
|
|
516
|
+
:<></>}
|
|
507
517
|
</View>
|
|
508
518
|
<Button transparent disabled={!tv_link} style={{ flexDirection:'row', alignItems:'center', padding:0 }}
|
|
509
519
|
onPress={() => tv_link && onTVSelect ? onTVSelect(tv_link) : console.log('')}>
|
|
@@ -637,7 +647,7 @@ const TeamEventMarket = ({ event, guide, parlays, hide_non_primary, disabled_mar
|
|
|
637
647
|
}
|
|
638
648
|
</View>
|
|
639
649
|
{flash_markets && onFlashSelect && flash_markets.length > 1 ?
|
|
640
|
-
<View
|
|
650
|
+
<View style={{ borderTopWidth:1, borderColor:C.borders.light, paddingTop:5 }}>
|
|
641
651
|
<FlatList
|
|
642
652
|
data={flash_markets.sort((a,b) => (a.total_responses??0) - (b.total_responses??0) || moment(a.end_datetime).unix() - moment(b.end_datetime).unix())}
|
|
643
653
|
key='flash_markets_event'
|
|
@@ -648,7 +658,7 @@ const TeamEventMarket = ({ event, guide, parlays, hide_non_primary, disabled_mar
|
|
|
648
658
|
</View>
|
|
649
659
|
:<></>}
|
|
650
660
|
{onFlashSelect && upcoming_flash_market ?
|
|
651
|
-
<View type='footer' style={{ flexDirection:'row', alignItems:'center', padding:10, borderBottomWidth:1, borderColor:C.borders.light }}>
|
|
661
|
+
<View nativeID='team_event_flash_markets' type='footer' style={{ flexDirection:'row', alignItems:'center', padding:10, borderBottomWidth:1, borderColor:C.borders.light }}>
|
|
652
662
|
{upcoming_flash_market.poll_image && flash_markets && flash_markets.length == 1 ?
|
|
653
663
|
<Image
|
|
654
664
|
source={{ uri: upcoming_flash_market.poll_image.url }}
|
|
@@ -670,7 +680,7 @@ const TeamEventMarket = ({ event, guide, parlays, hide_non_primary, disabled_mar
|
|
|
670
680
|
</View>
|
|
671
681
|
:<></>}
|
|
672
682
|
{event_status == 'active' ?
|
|
673
|
-
<View type='footer' style={{ padding:10, flexDirection:'row', alignItems:'center', flexWrap:'wrap', borderBottomLeftRadius:8, borderBottomRightRadius:8 }}>
|
|
683
|
+
<View type='footer' nativeID='team_event_activities' style={{ padding:10, flexDirection:'row', alignItems:'center', flexWrap:'wrap', borderBottomLeftRadius:8, borderBottomRightRadius:8 }}>
|
|
674
684
|
{!hide_liquidity ?
|
|
675
685
|
<Button
|
|
676
686
|
nativeID='team_event_liquidity'
|
package/src/types.d.ts
CHANGED
|
@@ -7,8 +7,68 @@ export interface ErrorProps {
|
|
|
7
7
|
message: string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
//HELP
|
|
11
|
+
|
|
12
|
+
export interface HelpActionProps {
|
|
13
|
+
action_label:string,
|
|
14
|
+
action_type:string,
|
|
15
|
+
action_url?:string,
|
|
16
|
+
internal_nav_options: {
|
|
17
|
+
page_stack:string,
|
|
18
|
+
page:string,
|
|
19
|
+
page_params:any
|
|
20
|
+
},
|
|
21
|
+
button_color:string,
|
|
22
|
+
button_border_color:string,
|
|
23
|
+
action_label_font:string
|
|
24
|
+
}
|
|
25
|
+
export interface HelpMediaObjProps {
|
|
26
|
+
media_url:string,
|
|
27
|
+
height:string,
|
|
28
|
+
width:string
|
|
29
|
+
}
|
|
30
|
+
export interface HelpTourProps {
|
|
31
|
+
help_tour_id:string,
|
|
32
|
+
help_tour_name:string,
|
|
33
|
+
help_tour_description:string,
|
|
34
|
+
status:'active' | 'inactive',
|
|
35
|
+
carousel_change_seconds:number,
|
|
36
|
+
create_datetime:any,
|
|
37
|
+
last_update_datetime:any
|
|
38
|
+
}
|
|
39
|
+
export interface HelpPromptProps {
|
|
40
|
+
help_prompt_id:string,
|
|
41
|
+
client_native_id:string,
|
|
42
|
+
help_tour_id?:string,
|
|
43
|
+
tour_priority?:number,
|
|
44
|
+
title:string,
|
|
45
|
+
title_font_color?:string,
|
|
46
|
+
body:string,
|
|
47
|
+
body_font_color?:string,
|
|
48
|
+
media_type?:'IMAGE'|'VIDEO',
|
|
49
|
+
media_obj?:HelpMediaObjProps,
|
|
50
|
+
footer?:string,
|
|
51
|
+
footer_font_color?:string,
|
|
52
|
+
help_background_color?:string,
|
|
53
|
+
help_background_opacity_color:string,
|
|
54
|
+
actions:HelpActionProps[],
|
|
55
|
+
status:'active'|'inactive',
|
|
56
|
+
create_datetime:any,
|
|
57
|
+
last_update_datetime:any,
|
|
58
|
+
prompt_type:string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface GuideResponseProps {
|
|
62
|
+
view_type:'prompt'|'tour',
|
|
63
|
+
help_prompt?:HelpPromptProps,
|
|
64
|
+
help_tour?:HelpTourProps,
|
|
65
|
+
tour_prompts?:HelpPromptProps[],
|
|
66
|
+
active_tour_prompt?:string
|
|
67
|
+
}
|
|
68
|
+
|
|
10
69
|
export interface GuideWrapProps {
|
|
11
|
-
tour?:
|
|
70
|
+
tour?:HelpPromptProps[],
|
|
71
|
+
help_tour?:HelpTourProps,
|
|
12
72
|
onComplete?:(state:'cancelled'|'complete') => void,
|
|
13
73
|
active?:boolean
|
|
14
74
|
}
|