be-components 0.2.7 → 0.2.9
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/ApiOverrides/index.js +41 -3
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- package/lib/commonjs/Authenticator/Components/LoginForm.js +1 -1
- package/lib/commonjs/BettorSearch/api/index.js +42 -0
- package/lib/commonjs/BettorSearch/api/index.js.map +1 -0
- package/lib/commonjs/BettorSearch/index.js +129 -0
- package/lib/commonjs/BettorSearch/index.js.map +1 -0
- package/lib/commonjs/Components/Icons.js +69 -3
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/CodeRedeem.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfileWizard.js +56 -0
- package/lib/commonjs/ProfileManager/Components/ProfileWizard.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/SettingsManager.js +219 -0
- package/lib/commonjs/ProfileManager/Components/SettingsManager.js.map +1 -0
- package/lib/commonjs/ProfileManager/api/index.js +13 -0
- package/lib/commonjs/ProfileManager/api/index.js.map +1 -1
- package/lib/commonjs/ProfileManager/index.js +8 -0
- package/lib/commonjs/ProfileManager/index.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerCard.js +119 -0
- package/lib/commonjs/SocialComponents/PlayerCard.js.map +1 -0
- package/lib/commonjs/SocialComponents/PlayerFollowButton.js +89 -0
- package/lib/commonjs/SocialComponents/PlayerFollowButton.js.map +1 -0
- package/lib/commonjs/SocialComponents/PlayerList.js +105 -0
- package/lib/commonjs/SocialComponents/PlayerList.js.map +1 -0
- package/lib/commonjs/SocialComponents/api/index.js +29 -0
- package/lib/commonjs/SocialComponents/api/index.js.map +1 -0
- package/lib/commonjs/SocialComponents/index.js +21 -0
- package/lib/commonjs/SocialComponents/index.js.map +1 -0
- package/lib/commonjs/constants/styles.js +4 -5
- package/lib/commonjs/constants/styles.js.map +1 -1
- package/lib/commonjs/index.js +10 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.d.js +2 -0
- package/lib/commonjs/types.d.js.map +1 -0
- package/lib/module/ApiOverrides/index.js +41 -3
- package/lib/module/ApiOverrides/index.js.map +1 -1
- package/lib/module/Authenticator/Components/LoginForm.js +1 -1
- package/lib/module/BettorSearch/api/index.js +36 -0
- package/lib/module/BettorSearch/api/index.js.map +1 -0
- package/lib/module/BettorSearch/index.js +120 -0
- package/lib/module/BettorSearch/index.js.map +1 -0
- package/lib/module/Components/Icons.js +69 -3
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/ProfileManager/Components/CodeRedeem.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfileWizard.js +56 -0
- package/lib/module/ProfileManager/Components/ProfileWizard.js.map +1 -1
- package/lib/module/ProfileManager/Components/SettingsManager.js +210 -0
- package/lib/module/ProfileManager/Components/SettingsManager.js.map +1 -0
- package/lib/module/ProfileManager/api/index.js +13 -0
- package/lib/module/ProfileManager/api/index.js.map +1 -1
- package/lib/module/ProfileManager/index.js +8 -0
- package/lib/module/ProfileManager/index.js.map +1 -1
- package/lib/module/SocialComponents/PlayerCard.js +112 -0
- package/lib/module/SocialComponents/PlayerCard.js.map +1 -0
- package/lib/module/SocialComponents/PlayerFollowButton.js +82 -0
- package/lib/module/SocialComponents/PlayerFollowButton.js.map +1 -0
- package/lib/module/SocialComponents/PlayerList.js +96 -0
- package/lib/module/SocialComponents/PlayerList.js.map +1 -0
- package/lib/module/SocialComponents/api/index.js +23 -0
- package/lib/module/SocialComponents/api/index.js.map +1 -0
- package/lib/module/SocialComponents/index.js +4 -0
- package/lib/module/SocialComponents/index.js.map +1 -0
- package/lib/module/constants/styles.js +4 -5
- package/lib/module/constants/styles.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.d.js +2 -0
- package/lib/module/types.d.js.map +1 -0
- package/lib/typescript/src/ApiOverrides/index.d.ts +8 -0
- package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/src/BettorSearch/api/index.d.ts +9 -0
- package/lib/typescript/src/BettorSearch/api/index.d.ts.map +1 -0
- package/lib/typescript/src/BettorSearch/index.d.ts +20 -0
- package/lib/typescript/src/BettorSearch/index.d.ts.map +1 -0
- package/lib/typescript/src/Components/Icons.d.ts +3 -1
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts +7 -3
- package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts +14 -0
- package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts.map +1 -0
- package/lib/typescript/src/ProfileManager/api/index.d.ts +7 -1
- package/lib/typescript/src/ProfileManager/api/index.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/index.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/index.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerCard.d.ts +18 -0
- package/lib/typescript/src/SocialComponents/PlayerCard.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PlayerFollowButton.d.ts +13 -0
- package/lib/typescript/src/SocialComponents/PlayerFollowButton.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PlayerList.d.ts +14 -0
- package/lib/typescript/src/SocialComponents/PlayerList.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/api/index.d.ts +8 -0
- package/lib/typescript/src/SocialComponents/api/index.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/index.d.ts +4 -0
- package/lib/typescript/src/SocialComponents/index.d.ts.map +1 -0
- package/lib/typescript/src/constants/styles.d.ts +1 -2
- package/lib/typescript/src/constants/styles.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ApiOverrides/index.ts +28 -3
- package/src/Authenticator/Components/LoginForm.tsx +1 -1
- package/src/BettorSearch/api/index.ts +30 -0
- package/src/BettorSearch/index.tsx +106 -0
- package/src/Components/Icons.tsx +35 -2
- package/src/ProfileManager/Components/CodeRedeem.tsx +2 -1
- package/src/ProfileManager/Components/ProfileWizard.tsx +63 -5
- package/src/ProfileManager/Components/SettingsManager.tsx +152 -0
- package/src/ProfileManager/api/index.ts +13 -1
- package/src/ProfileManager/api/types.d.ts +15 -25
- package/src/ProfileManager/index.tsx +13 -3
- package/src/SocialComponents/PlayerCard.tsx +86 -0
- package/src/SocialComponents/PlayerFollowButton.tsx +80 -0
- package/src/SocialComponents/PlayerList.tsx +81 -0
- package/src/SocialComponents/api/index.ts +23 -0
- package/src/SocialComponents/index.tsx +8 -0
- package/src/constants/styles.ts +1 -8
- package/src/index.tsx +4 -0
- package/src/types.d.ts +354 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ProfileManager/api/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ProfileManager/api/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -9,7 +9,7 @@ type ProfileOverviewProps = {
|
|
|
9
9
|
onClose: () => void;
|
|
10
10
|
onLogout: () => void;
|
|
11
11
|
onPlayerUpdate?: (p: MyPlayerProps, attribute?: string) => void;
|
|
12
|
-
profile_attribute?: 'basic' | 'phone' | 'email' | 'dob' | 'password' | 'vouch';
|
|
12
|
+
profile_attribute?: 'basic' | 'phone' | 'email' | 'dob' | 'password' | 'vouch' | 'notification' | 'preferences';
|
|
13
13
|
walkthrough?: boolean;
|
|
14
14
|
};
|
|
15
15
|
declare const ProfileManager: ({ profile_attribute, onPlayerUpdate, show_welcome, hidden_groups, hidden_steps, hidden_levels, walkthrough, width, onClose, onLogout }: ProfileOverviewProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileManager/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,OAAO,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileManager/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,OAAO,KAAK,EAAE,aAAa,EAAoC,MAAM,aAAa,CAAC;AAGnF,KAAK,oBAAoB,GAAG;IACxB,KAAK,EAAC,MAAM,CAAC;IACb,YAAY,CAAC,EAAC,OAAO,CAAC;IAEtB,aAAa,CAAC,EAAC,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAC,MAAM,EAAE,CAAC;IACvB,aAAa,CAAC,EAAC,MAAM,EAAE,CAAC;IACxB,OAAO,EAAC,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAC,MAAM,IAAI,CAAC;IACpB,cAAc,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,EAAE,SAAS,CAAC,EAAC,MAAM,KAAK,IAAI,CAAC;IAC7D,iBAAiB,CAAC,EAAC,OAAO,GAAC,OAAO,GAAC,OAAO,GAAC,KAAK,GAAC,UAAU,GAAC,OAAO,GAAC,cAAc,GAAC,aAAa,CAAC;IACjG,WAAW,CAAC,EAAC,OAAO,CAAA;CACvB,CAAA;AAED,QAAA,MAAM,cAAc,2IAA4I,oBAAoB,sBA6FnL,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PlayerFollowerProps, PublicPlayerProps } from "../types";
|
|
3
|
+
type PlayerCardProps = {
|
|
4
|
+
player: PublicPlayerProps;
|
|
5
|
+
width: number;
|
|
6
|
+
follow_loading?: boolean;
|
|
7
|
+
alignment?: 'vertical' | 'horizontal';
|
|
8
|
+
player_follower?: PlayerFollowerProps;
|
|
9
|
+
player_following?: PlayerFollowerProps;
|
|
10
|
+
show_follow?: boolean;
|
|
11
|
+
style?: any;
|
|
12
|
+
float?: boolean;
|
|
13
|
+
onSelectPlayer: (p: PublicPlayerProps) => void;
|
|
14
|
+
onFollowingUpdate: (pf: PlayerFollowerProps) => void;
|
|
15
|
+
};
|
|
16
|
+
declare const PlayerCard: ({ player, width, follow_loading, alignment, style, float, show_follow, player_follower, player_following, onSelectPlayer, onFollowingUpdate }: PlayerCardProps) => React.JSX.Element;
|
|
17
|
+
export default PlayerCard;
|
|
18
|
+
//# sourceMappingURL=PlayerCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlayerCard.d.ts","sourceRoot":"","sources":["../../../../src/SocialComponents/PlayerCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAOvE,KAAK,eAAe,GAAG;IACnB,MAAM,EAAC,iBAAiB,CAAC;IACzB,KAAK,EAAC,MAAM,CAAC;IACb,cAAc,CAAC,EAAC,OAAO,CAAC;IACxB,SAAS,CAAC,EAAC,UAAU,GAAC,YAAY,CAAC;IACnC,eAAe,CAAC,EAAC,mBAAmB,CAAC;IACrC,gBAAgB,CAAC,EAAC,mBAAmB,CAAC;IACtC,WAAW,CAAC,EAAC,OAAO,CAAC;IACrB,KAAK,CAAC,EAAC,GAAG,CAAC;IACX,KAAK,CAAC,EAAC,OAAO,CAAC;IACf,cAAc,EAAC,CAAC,CAAC,EAAC,iBAAiB,KAAK,IAAI,CAAC;IAC7C,iBAAiB,EAAC,CAAC,EAAE,EAAC,mBAAmB,KAAK,IAAI,CAAA;CACrD,CAAA;AAED,QAAA,MAAM,UAAU,kJAAkJ,eAAe,sBA2ChL,CAAA;AAoBD,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PlayerFollowerProps } from "../types";
|
|
3
|
+
type PlayerFollowButtonProps = {
|
|
4
|
+
player_id: string;
|
|
5
|
+
style?: any;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
follower?: PlayerFollowerProps;
|
|
8
|
+
following?: PlayerFollowerProps;
|
|
9
|
+
onFollowingUpdate: (pf: PlayerFollowerProps) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const PlayerFollowButton: ({ player_id, loading, style, follower, following, onFollowingUpdate }: PlayerFollowButtonProps) => React.JSX.Element;
|
|
12
|
+
export default PlayerFollowButton;
|
|
13
|
+
//# sourceMappingURL=PlayerFollowButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlayerFollowButton.d.ts","sourceRoot":"","sources":["../../../../src/SocialComponents/PlayerFollowButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAGnD,KAAK,uBAAuB,GAAG;IAC3B,SAAS,EAAC,MAAM,CAAC;IACjB,KAAK,CAAC,EAAC,GAAG,CAAC;IACX,OAAO,CAAC,EAAC,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAC,mBAAmB,CAAC;IAC9B,SAAS,CAAC,EAAC,mBAAmB,CAAA;IAC9B,iBAAiB,EAAC,CAAC,EAAE,EAAC,mBAAmB,KAAK,IAAI,CAAA;CACrD,CAAA;AAED,QAAA,MAAM,kBAAkB,0EAA0E,uBAAuB,sBA8DxH,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PublicPlayerProps } from '../types';
|
|
3
|
+
type PlayerListProps = {
|
|
4
|
+
players: PublicPlayerProps[];
|
|
5
|
+
style?: any;
|
|
6
|
+
onPlayerSelect: (p: PublicPlayerProps) => void;
|
|
7
|
+
options: {
|
|
8
|
+
follow_status?: boolean;
|
|
9
|
+
direction: 'horizontal' | 'vertical';
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
declare const PlayerList: ({ players, style, options, onPlayerSelect }: PlayerListProps) => React.JSX.Element;
|
|
13
|
+
export default PlayerList;
|
|
14
|
+
//# sourceMappingURL=PlayerList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlayerList.d.ts","sourceRoot":"","sources":["../../../../src/SocialComponents/PlayerList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,KAAK,EAAuB,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEvE,KAAK,eAAe,GAAG;IACnB,OAAO,EAAC,iBAAiB,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,cAAc,EAAC,CAAC,CAAC,EAAC,iBAAiB,KAAK,IAAI,CAAC;IAC7C,OAAO,EAAE;QACL,aAAa,CAAC,EAAC,OAAO,CAAC;QACvB,SAAS,EAAE,YAAY,GAAG,UAAU,CAAC;KACxC,CAAA;CACJ,CAAA;AAED,QAAA,MAAM,UAAU,gDAAgD,eAAe,sBAwD9E,CAAA;AAQD,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PlayerFollowerProps } from "../../types";
|
|
2
|
+
export { SocialComponentApi };
|
|
3
|
+
declare const SocialComponentApi: {
|
|
4
|
+
setEnvironment: () => void;
|
|
5
|
+
getBulkPlayerfollowers: (player_ids: string[]) => Promise<any>;
|
|
6
|
+
savePlayerFollower: (player_follower: PlayerFollowerProps) => Promise<PlayerFollowerProps>;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/SocialComponents/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIvD,OAAO,EAAE,kBAAkB,EAAE,CAAA;AAE7B,QAAA,MAAM,kBAAkB;;yCAMqB,MAAM,EAAE;0CAIP,mBAAmB,KAAE,QAAQ,mBAAmB,CAAC;CAI9F,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/SocialComponents/index.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,UAAU,MAAM,cAAc,CAAC;AAGtC,OAAO,EACH,UAAU,EACV,UAAU,EACb,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/constants/styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/constants/styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;CAStB,CAAA;AAGF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;CAyBtB,CAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import Authenticator from "./Authenticator";
|
|
2
2
|
import ProfileManager from "./ProfileManager";
|
|
3
3
|
import * as Components from './Components';
|
|
4
|
+
import * as SocialComponents from './SocialComponents';
|
|
4
5
|
import { APIOverrides } from "./ApiOverrides";
|
|
5
6
|
import LinearGradient from "react-native-linear-gradient";
|
|
6
7
|
import Colors from "./constants/colors";
|
|
7
8
|
import Observer, { BEEventApi, BELinkApi } from './Observer';
|
|
8
|
-
|
|
9
|
+
import BettorSearch from "./BettorSearch";
|
|
10
|
+
export { Authenticator, Observer, BEEventApi, BELinkApi, ProfileManager, Components, SocialComponents, APIOverrides, LinearGradient, BettorSearch, Colors };
|
|
9
11
|
//# 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,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;
|
|
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;AAG1C,OAAO,EACL,aAAa,EACb,QAAQ,EACR,UAAU,EACV,SAAS,EACT,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,MAAM,EACP,CAAA"}
|
package/package.json
CHANGED
|
@@ -9,19 +9,26 @@ const ENVIRONMENT_ENDPOINTS = {
|
|
|
9
9
|
AUTH_SVC_API: 'http://localhost:5000',
|
|
10
10
|
VOUCH_ID: 'adqEZph8t*_NBFy6u_l4!t~Hin6kpK',
|
|
11
11
|
VOUCHED_CALLBACK_URL: 'https://d98b-75-168-152-8.ngrok-free.app/v1/players/vouch/hook',
|
|
12
|
-
VOUCHED_SANDBOX: true
|
|
12
|
+
VOUCHED_SANDBOX: true,
|
|
13
|
+
EVENT_SVC_API: 'http://localhost:3002',
|
|
14
|
+
SOCIAL_SVC_API: 'http://localhost:3011'
|
|
13
15
|
},
|
|
14
16
|
STAGING: {
|
|
15
17
|
AUTH_SVC_API: 'https://stage-be-auth-svc.herokuapp.com',
|
|
16
18
|
VOUCH_ID: 'adqEZph8t*_NBFy6u_l4!t~Hin6kpK',
|
|
17
19
|
VOUCHED_CALLBACK_URL: 'https://stage-be-auth-svc.herokuapp.com/v1/players/vouch/hook',
|
|
18
|
-
VOUCHED_SANDBOX: true
|
|
20
|
+
VOUCHED_SANDBOX: true,
|
|
21
|
+
EVENT_SVC_API: 'https://stage-be-sr-svc.herokuapp.com',
|
|
22
|
+
SOCIAL_SVC_API: 'https://stage-be-soc-svc.herokuapp.com'
|
|
23
|
+
|
|
19
24
|
},
|
|
20
25
|
PRODUCTION: {
|
|
21
26
|
AUTH_SVC_API: 'https://api.players.bettoredge.com',
|
|
22
27
|
VOUCH_ID: 'Q3tmJ3r9FnkN*n-MqS-!j0NS*k!mdo',
|
|
23
28
|
VOUCHED_CALLBACK_URL: 'https://be-auth-svc.herokuapp.com/v1/players/vouch/hook',
|
|
24
|
-
VOUCHED_SANDBOX: false
|
|
29
|
+
VOUCHED_SANDBOX: false,
|
|
30
|
+
EVENT_SVC_API: 'https://api.events.bettoredge.com',
|
|
31
|
+
SOCIAL_SVC_API: 'https://api.social.bettoredge.com'
|
|
25
32
|
}
|
|
26
33
|
}
|
|
27
34
|
|
|
@@ -80,6 +87,24 @@ const APIOverrides = {
|
|
|
80
87
|
}
|
|
81
88
|
return auth_state
|
|
82
89
|
},
|
|
90
|
+
authenticateApp: async(auth_response:AuthStateProps, options: { cache?:boolean }):Promise<{ result: 'success'|'fail' }> => {
|
|
91
|
+
//First set the bearertokena and refresh interceptor
|
|
92
|
+
const { access_token, player_id, refresh_token, expire_datetime, distinct_id } = auth_response
|
|
93
|
+
if(!access_token || !refresh_token || !player_id){ return { result: 'fail' } }
|
|
94
|
+
APIOverrides.setBearerToken(access_token);
|
|
95
|
+
APIOverrides.setRefreshTokenInterceptor(access_token, distinct_id, options.cache)
|
|
96
|
+
if(options.cache){
|
|
97
|
+
await APIOverrides.cacheTokens(access_token, player_id, refresh_token, expire_datetime)
|
|
98
|
+
}
|
|
99
|
+
return { result: 'success' }
|
|
100
|
+
},
|
|
101
|
+
logoutApp: async():Promise<{result: 'success'|'fail'}> => {
|
|
102
|
+
//First remove bearertoken
|
|
103
|
+
APIOverrides.setBearerToken(undefined);
|
|
104
|
+
//Then clear tokens from cache
|
|
105
|
+
await APIOverrides.clearTokens();
|
|
106
|
+
return { result: 'success' }
|
|
107
|
+
},
|
|
83
108
|
setEnvironment: (env:'PRODUCTION'|'STAGING'|'DEVELOPMENT') => {
|
|
84
109
|
ENDPOINTS = ENVIRONMENT_ENDPOINTS[env]
|
|
85
110
|
},
|
|
@@ -24,7 +24,7 @@ const LoginForm = ({ width, visible, onRegister, onAuthenticated }:LoginFormProp
|
|
|
24
24
|
}>({
|
|
25
25
|
loading:false,
|
|
26
26
|
attribute:'username',
|
|
27
|
-
value:'
|
|
27
|
+
value:''
|
|
28
28
|
});
|
|
29
29
|
const [ halted, setHalted ] = useState(false);
|
|
30
30
|
const [ login_try, setLoginTry ] = useState<{
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { APIOverrides } from "../../ApiOverrides";
|
|
3
|
+
import type { EventProps, PublicPlayerProps, TournamentProps } from '../../types';
|
|
4
|
+
|
|
5
|
+
let AUTH_SVC_API = '';
|
|
6
|
+
let EVENT_SVC_API = '';
|
|
7
|
+
|
|
8
|
+
export { BettorSearchApi }
|
|
9
|
+
|
|
10
|
+
const BettorSearchApi = {
|
|
11
|
+
setEnvironment: () => {
|
|
12
|
+
const endpoints = APIOverrides.getEndpoints();
|
|
13
|
+
AUTH_SVC_API = endpoints['AUTH_SVC_API'] as string;
|
|
14
|
+
EVENT_SVC_API = endpoints['EVENT_SVC_API'] as string;
|
|
15
|
+
},
|
|
16
|
+
searchPlayers: async(search_value:string, offset:number):Promise<PublicPlayerProps[]> => {
|
|
17
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/players/player/search/value`, { search_value, offset })
|
|
18
|
+
return resp.data.players
|
|
19
|
+
},
|
|
20
|
+
searchEvents: async(search_value:string, offset:number):Promise<EventProps[]> => {
|
|
21
|
+
const resp = await axios.post(`${EVENT_SVC_API}/v1/events/search`, { search_value, offset })
|
|
22
|
+
console.log(resp.data)
|
|
23
|
+
return resp.data.events
|
|
24
|
+
},
|
|
25
|
+
searchTournaments: async(search_value:string, offset:number):Promise<TournamentProps[]> => {
|
|
26
|
+
const resp = await axios.post(`${EVENT_SVC_API}/v1/tournaments/search/value`, { search_value, offset })
|
|
27
|
+
console.log(resp.data)
|
|
28
|
+
return resp.data.tournaments
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { Button, Icons, TextInput } from '../Components';
|
|
4
|
+
import Colors from '../constants/colors';
|
|
5
|
+
import { BettorSearchApi } from './api';
|
|
6
|
+
import type { EventProps, PublicPlayerProps, TournamentProps } from '../types';
|
|
7
|
+
|
|
8
|
+
type BettorSearchProps = {
|
|
9
|
+
search_types:string[],
|
|
10
|
+
init_search_value?:string,
|
|
11
|
+
container_style?:any,
|
|
12
|
+
search_style?:any,
|
|
13
|
+
button_style?:any,
|
|
14
|
+
onSearchResults:(results: {
|
|
15
|
+
offset:number,
|
|
16
|
+
players:PublicPlayerProps[],
|
|
17
|
+
events:EventProps[],
|
|
18
|
+
tournaments:TournamentProps[]
|
|
19
|
+
competitions:any[],
|
|
20
|
+
polls: any[]
|
|
21
|
+
}) => void,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const BettorSearch = ({ init_search_value, search_types, container_style, search_style, button_style, onSearchResults }:BettorSearchProps) => {
|
|
25
|
+
const [ search, setSearch ] = useState({
|
|
26
|
+
search_value: '',
|
|
27
|
+
offset:0
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const { search_value, offset } = search;
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
BettorSearchApi.setEnvironment()
|
|
34
|
+
if(init_search_value){
|
|
35
|
+
handleSearch(init_search_value)
|
|
36
|
+
}
|
|
37
|
+
},[init_search_value])
|
|
38
|
+
|
|
39
|
+
const handleSearch = async(value?:string) => {
|
|
40
|
+
if(!value){ value = search_value }
|
|
41
|
+
let players:PublicPlayerProps[] = []
|
|
42
|
+
let events:EventProps[] = []
|
|
43
|
+
let tournaments:TournamentProps[] = []
|
|
44
|
+
let competitions:any[] =[]
|
|
45
|
+
let polls: any[] = []
|
|
46
|
+
const performSearches = search_types.map(async t => {
|
|
47
|
+
try {
|
|
48
|
+
switch(t){
|
|
49
|
+
case 'players':
|
|
50
|
+
console.log('in here!')
|
|
51
|
+
return players = await BettorSearchApi.searchPlayers(value, offset)
|
|
52
|
+
case 'events':
|
|
53
|
+
return events = await BettorSearchApi.searchEvents(value, offset);
|
|
54
|
+
case 'tournaments':
|
|
55
|
+
return tournaments = await BettorSearchApi.searchTournaments(value, offset);
|
|
56
|
+
default: return
|
|
57
|
+
}
|
|
58
|
+
} catch (e) {
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
await Promise.all(performSearches)
|
|
63
|
+
|
|
64
|
+
onSearchResults({
|
|
65
|
+
offset,
|
|
66
|
+
players,
|
|
67
|
+
events,
|
|
68
|
+
tournaments,
|
|
69
|
+
competitions,
|
|
70
|
+
polls
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<View style={{ ...container_style }}>
|
|
76
|
+
<View style={{ padding:10, flexDirection:'row' }}>
|
|
77
|
+
<View style={search_style ?? { flexDirection:'row', alignItems:'center', flex:1, borderWidth:1, borderRadius:22, paddingLeft:10, marginRight:5, borderColor:Colors.shades.shade600 }}>
|
|
78
|
+
<View style={{ padding:5 }}>
|
|
79
|
+
<Icons.SearchIcon
|
|
80
|
+
color={Colors.brand.midnight}
|
|
81
|
+
size={18}
|
|
82
|
+
/>
|
|
83
|
+
</View>
|
|
84
|
+
<TextInput
|
|
85
|
+
style={{ borderWidth:0, borderRadius:0, borderTopRightRadius:22, borderBottomRightRadius:22, flex:1, fontSize:14 }}
|
|
86
|
+
placeholder='Search...'
|
|
87
|
+
placeholderTextColor={Colors.brand.slate}
|
|
88
|
+
value={search_value}
|
|
89
|
+
onChangeText={(text) => setSearch({ ...search, search_value:text })}
|
|
90
|
+
/>
|
|
91
|
+
</View>
|
|
92
|
+
<Button
|
|
93
|
+
title='Search'
|
|
94
|
+
style={{ ...button_style }}
|
|
95
|
+
title_color={Colors.shades.white}
|
|
96
|
+
backgroundColor={Colors.brand.electric}
|
|
97
|
+
padding={15}
|
|
98
|
+
title_size={14}
|
|
99
|
+
onPress={() => handleSearch()}
|
|
100
|
+
/>
|
|
101
|
+
</View>
|
|
102
|
+
</View>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export default BettorSearch
|
package/src/Components/Icons.tsx
CHANGED
|
@@ -9,9 +9,10 @@ type IconProps = {
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
const SearchIcon = ({ color }: IconProps) => {
|
|
12
|
+
const SearchIcon = ({ color, size }: IconProps) => {
|
|
13
|
+
const icon_size = size ?? 19
|
|
13
14
|
return (
|
|
14
|
-
<svg width=
|
|
15
|
+
<svg width={`${icon_size}px`} height={`${icon_size}px`} viewBox="0 0 19 19" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
15
16
|
<title>Vector (2)</title>
|
|
16
17
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
17
18
|
<g id="Vector-(2)" transform="translate(0.000000, 0.000000)" fill={color??Colors.brand.midnight} fill-rule="nonzero">
|
|
@@ -70,6 +71,23 @@ const LogoutIcon = ({color, size}:IconProps) => {
|
|
|
70
71
|
)
|
|
71
72
|
}
|
|
72
73
|
|
|
74
|
+
const NotificationIcon = ({color, size}:IconProps) => {
|
|
75
|
+
const ratio = 0.863
|
|
76
|
+
let height = size ?? 14
|
|
77
|
+
let width = height * ratio
|
|
78
|
+
return (
|
|
79
|
+
<svg width={`${width}px`} height={`${height}px`} viewBox="0 0 19 22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
80
|
+
<title>notification-bell-on-svgrepo-com (1)</title>
|
|
81
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linejoin="round">
|
|
82
|
+
<g id="notification-bell-on-svgrepo-com-(1)" transform="translate(1.887826, 1.000000)" stroke={color ?? Colors.brand.midnight} stroke-width="2">
|
|
83
|
+
<path d="M5.09214307,16.8717414 C4.4618511,16.8717414 2.49815976,16.8717414 1.04327967,16.8717414 C0.26810762,16.8717414 -0.235114486,16.0559958 0.111548704,15.3626694 L1.00216393,13.581439 C1.29174683,13.0022941 1.44250804,12.3643379 1.44250804,11.7167883 C1.44250804,10.9141814 1.44250804,9.72200209 1.44250804,8.52971846 C1.44250804,6.44421272 2.4852609,2.27320125 7.69902524,2.27320125 C12.9127896,2.27320125 13.9555424,6.44421272 13.9555424,8.52971846 C13.9555424,9.72200209 13.9555424,10.9141814 13.9555424,11.7167883 C13.9555424,12.3643379 14.1063245,13.0022941 14.395897,13.581439 L15.2865122,15.3626694 C15.6331233,16.0559958 15.1289522,16.8717414 14.353874,16.8717414 L10.3059074,16.8717414 M5.09214307,16.8717414 C5.09214307,18.9572471 6.13489594,20 7.69902524,20 C9.26315454,20 10.3059074,18.9572471 10.3059074,16.8717414 M5.09214307,16.8717414 C6.72102733,16.8717414 10.3059074,16.8717414 10.3059074,16.8717414" id="Shape"></path>
|
|
84
|
+
<line x1="7.69902524" y1="2.08550574" x2="7.69902524" y2="0" id="Path" stroke-linecap="round"></line>
|
|
85
|
+
</g>
|
|
86
|
+
</g>
|
|
87
|
+
</svg>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
73
91
|
const USDIcon = ({ color, size }:IconProps) => {
|
|
74
92
|
let icon_size = size ?? 17
|
|
75
93
|
return (
|
|
@@ -178,6 +196,19 @@ const LogoutIcon = ({color, size}:IconProps) => {
|
|
|
178
196
|
)
|
|
179
197
|
}
|
|
180
198
|
|
|
199
|
+
const PreferencesIcon = ({ color, size }:IconProps) => {
|
|
200
|
+
return (
|
|
201
|
+
<svg width={`${size??14}px`} height={`${size??14}px`} viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
202
|
+
<title>preferences-svgrepo-com</title>
|
|
203
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
204
|
+
<g id="preferences-svgrepo-com" fill={color ?? Colors.brand.midnight} fill-rule="nonzero">
|
|
205
|
+
<path d="M18.75,17.5 C18.75,18.19 18.19,18.75 17.5,18.75 L2.5,18.75 C1.81,18.75 1.25,18.19 1.25,17.5 L1.25,2.5 C1.25,1.81 1.81,1.25 2.5,1.25 L17.5,1.25 C18.19,1.25 18.75,1.81 18.75,2.5 L18.75,17.5 L18.75,17.5 Z M17.5,0 L2.5,0 C1.119375,0 0,1.119375 0,2.5 L0,17.5 C0,18.880625 1.119375,20 2.5,20 L17.5,20 C18.880625,20 20,18.880625 20,17.5 L20,2.5 C20,1.119375 18.880625,0 17.5,0 L17.5,0 Z M12.5,12.125 C11.67125,12.125 11,11.453125 11,10.625 C11,9.796875 11.67125,9.125 12.5,9.125 C13.32875,9.125 14,9.796875 14,10.625 C14,11.453125 13.32875,12.125 12.5,12.125 L12.5,12.125 Z M16.25,10 L14.91125,10 C14.633125,8.923125 13.66375,8.125 12.5,8.125 C11.33625,8.125 10.3675,8.923125 10.08875,10 L3.75,10 C3.405,10 3.125,10.28 3.125,10.625 C3.125,10.970625 3.405,11.25 3.75,11.25 L10.08875,11.25 C10.366875,12.326875 11.33625,13.125 12.5,13.125 C13.66375,13.125 14.633125,12.326875 14.91125,11.25 L16.25,11.25 C16.595,11.25 16.875,10.970625 16.875,10.625 C16.875,10.28 16.595,10 16.25,10 L16.25,10 Z M6.875,7.125 C6.04625,7.125 5.375,6.453125 5.375,5.625 C5.375,4.796875 6.04625,4.125625 6.875,4.125625 C7.70375,4.125625 8.375,4.796875 8.375,5.625 C8.375,6.453125 7.70375,7.125 6.875,7.125 L6.875,7.125 Z M16.25,5 L9.28625,5 C9.008125,3.923125 8.03875,3.125 6.875,3.125 C5.71125,3.125 4.741875,3.923125 4.46375,5 L3.75,5 C3.405,5 3.125,5.28 3.125,5.625 C3.125,5.970625 3.405,6.25 3.75,6.25 L4.46375,6.25 C4.741875,7.326875 5.71125,8.125 6.875,8.125 C8.03875,8.125 9.008125,7.326875 9.28625,6.25 L16.25,6.25 C16.595,6.25 16.875,5.970625 16.875,5.625 C16.875,5.28 16.595,5 16.25,5 L16.25,5 Z M6.875,17.125 C6.04625,17.125 5.375,16.453125 5.375,15.625 C5.375,14.796875 6.04625,14.125625 6.875,14.125625 C7.70375,14.125625 8.375,14.796875 8.375,15.625 C8.375,16.453125 7.70375,17.125 6.875,17.125 L6.875,17.125 Z M16.25,15 L9.28625,15 C9.008125,13.92375 8.03875,13.125 6.875,13.125 C5.71125,13.125 4.741875,13.92375 4.46375,15 L3.75,15 C3.405,15 3.125,15.279375 3.125,15.625 C3.125,15.970625 3.405,16.25 3.75,16.25 L4.46375,16.25 C4.741875,17.326875 5.71125,18.125 6.875,18.125 C8.03875,18.125 9.008125,17.326875 9.28625,16.25 L16.25,16.25 C16.595,16.25 16.875,15.970625 16.875,15.625 C16.875,15.279375 16.595,15 16.25,15 L16.25,15 Z" id="preferences"></path>
|
|
206
|
+
</g>
|
|
207
|
+
</g>
|
|
208
|
+
</svg>
|
|
209
|
+
)
|
|
210
|
+
}
|
|
211
|
+
|
|
181
212
|
|
|
182
213
|
const AwardRibbonIcon = ({ color, size }:IconProps) => {
|
|
183
214
|
const ratio = 0.666667;
|
|
@@ -736,6 +767,7 @@ export default {
|
|
|
736
767
|
AlertIcon,
|
|
737
768
|
BankIcon,
|
|
738
769
|
EditIcon,
|
|
770
|
+
PreferencesIcon,
|
|
739
771
|
CheckCirlceIcon,
|
|
740
772
|
ShareIcon,
|
|
741
773
|
TrophyIcon,
|
|
@@ -743,6 +775,7 @@ export default {
|
|
|
743
775
|
UserIcon,
|
|
744
776
|
PhoneIcon,
|
|
745
777
|
EmailIcon,
|
|
778
|
+
NotificationIcon,
|
|
746
779
|
InProgressIcon,
|
|
747
780
|
LockClosedIcon,
|
|
748
781
|
CloseIcon,
|
|
@@ -2,8 +2,9 @@ import React, { useEffect, useState } from 'react';
|
|
|
2
2
|
import { ActivityIndicator, View, Image } from 'react-native';
|
|
3
3
|
import { Button, Icons, Text, TextInput } from '../../Components';
|
|
4
4
|
import Colors from '../../constants/colors';
|
|
5
|
-
import type { CodeRequestProps, MyPlayerProps, PlayerReferralProps, PromoProps,
|
|
5
|
+
import type { CodeRequestProps, MyPlayerProps, PlayerReferralProps, PromoProps, RewardOptionProps } from '../api/types';
|
|
6
6
|
import { ProfileApi, ProfileHelpers } from '../api';
|
|
7
|
+
import type { PublicPlayerProps } from '../../types';
|
|
7
8
|
|
|
8
9
|
type CodeRedeemProps = {
|
|
9
10
|
player:MyPlayerProps,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { View, FlatList, TouchableOpacity, Image, Linking } from 'react-native';
|
|
3
|
-
import type { MyPlayerProps, ProfileLevelProps, ProfileStepProps } from "../api/types"
|
|
3
|
+
import type { MyPlayerProps, ProfileLevelProps, ProfileStepProps, SettingProps } from "../api/types"
|
|
4
4
|
import { Button, Icons, Text } from '../../Components';
|
|
5
5
|
import Colors from '../../constants/colors';
|
|
6
6
|
import BasicInfoManager from './BasicInfoManager';
|
|
@@ -13,23 +13,28 @@ import VouchCard from './VouchCard';
|
|
|
13
13
|
import ProfilePicManager from './ProfilePicManager';
|
|
14
14
|
import ProfileWelcome from './ProfileWelcome';
|
|
15
15
|
import CodeRedeem from './CodeRedeem';
|
|
16
|
+
import type { PlayerSettingProps } from '../../types';
|
|
17
|
+
import SettingsManager from './SettingsManager';
|
|
16
18
|
|
|
17
19
|
type ProfileWizardProps = {
|
|
18
20
|
player:MyPlayerProps,
|
|
21
|
+
player_settings:PlayerSettingProps[],
|
|
22
|
+
settings:SettingProps[]
|
|
19
23
|
show_welcome?:boolean,
|
|
20
24
|
width:number,
|
|
21
25
|
hidden_groups?:string[],
|
|
22
26
|
hidden_levels?:string[],
|
|
23
27
|
hidden_steps?:string[],
|
|
24
28
|
init_walkthrough?:boolean,
|
|
25
|
-
profile_attribute?:'basic'|'phone'|'email'|'dob'|'password'|'vouch',
|
|
29
|
+
profile_attribute?:'basic'|'phone'|'email'|'dob'|'password'|'vouch'|'notification'|'preferences',
|
|
26
30
|
onClose:() => void,
|
|
27
31
|
onLogout:() => void,
|
|
28
32
|
onSelectLevel:(level:ProfileLevelProps) => void,
|
|
29
33
|
onPlayerUpdate:(player:MyPlayerProps, attribute?:string) => void
|
|
34
|
+
onUpdatePlayerSetting:(player_setting:PlayerSettingProps) => void
|
|
30
35
|
}
|
|
31
36
|
|
|
32
|
-
const ProfileWizard = ({ player, init_walkthrough, show_welcome, profile_attribute, width, hidden_groups, hidden_levels, hidden_steps, onPlayerUpdate, onSelectLevel, onClose, onLogout }:ProfileWizardProps) => {
|
|
37
|
+
const ProfileWizard = ({ player, settings, player_settings, init_walkthrough, show_welcome, profile_attribute, width, hidden_groups, hidden_levels, hidden_steps, onUpdatePlayerSetting, onPlayerUpdate, onSelectLevel, onClose, onLogout }:ProfileWizardProps) => {
|
|
33
38
|
const [ draft_player, setDraftPlayer ] = useState(player);
|
|
34
39
|
const [ show_logout, setShowLogout ] = useState(false);
|
|
35
40
|
const [ walkthrough, setWalkthrough ] = useState<boolean | undefined>(false);
|
|
@@ -81,7 +86,8 @@ const ProfileWizard = ({ player, init_walkthrough, show_welcome, profile_attrib
|
|
|
81
86
|
tracked:false,
|
|
82
87
|
profile_steps: [
|
|
83
88
|
{ num: 1, check: 'preferences', label: 'Profile Preferences', description: 'Set your profile preferences like unit size and more', complete: true },
|
|
84
|
-
{ num: 2, check: 'notification', label: 'Notification Settings', description: 'Set how and when you would like to be notified', complete:true },
|
|
89
|
+
{ num: 2, check: 'notification', label: 'Notification Settings', description: 'Set how and when you would like to be notified', complete:true },
|
|
90
|
+
{ num: 3, check: 'sharing', label: 'Share Settings', description: 'Set who and when people can see your activity.', complete:true },
|
|
85
91
|
]
|
|
86
92
|
|
|
87
93
|
}
|
|
@@ -99,6 +105,22 @@ const ProfileWizard = ({ player, init_walkthrough, show_welcome, profile_attrib
|
|
|
99
105
|
if(show_welcome){
|
|
100
106
|
setActiveLevel(groups[0].profile_levels[0])
|
|
101
107
|
}
|
|
108
|
+
if(profile_attribute){
|
|
109
|
+
let profile_level:ProfileLevelProps|undefined = undefined
|
|
110
|
+
let profile_step:ProfileStepProps|undefined = undefined
|
|
111
|
+
groups.map(g => g.profile_levels.map((l:ProfileLevelProps) => {
|
|
112
|
+
let step = l.profile_steps.find(ps => ps.check == profile_attribute)
|
|
113
|
+
console.log(step)
|
|
114
|
+
if(step){
|
|
115
|
+
profile_step = step
|
|
116
|
+
profile_level = l
|
|
117
|
+
}
|
|
118
|
+
}))
|
|
119
|
+
if(profile_step && profile_level){
|
|
120
|
+
setActiveLevel(profile_level)
|
|
121
|
+
setActiveStep(profile_step)
|
|
122
|
+
}
|
|
123
|
+
}
|
|
102
124
|
},[player])
|
|
103
125
|
|
|
104
126
|
const getStepColor = (step:ProfileStepProps, active?:boolean) => {
|
|
@@ -447,7 +469,43 @@ const ProfileWizard = ({ player, init_walkthrough, show_welcome, profile_attrib
|
|
|
447
469
|
return setActiveLevel(undefined)
|
|
448
470
|
}}
|
|
449
471
|
/>
|
|
450
|
-
|
|
472
|
+
:active_step?.check == 'notification' ?
|
|
473
|
+
<SettingsManager
|
|
474
|
+
title='Notification Settings'
|
|
475
|
+
description='Set how and where you would like to receive notifications'
|
|
476
|
+
icon={<Icons.PreferencesIcon
|
|
477
|
+
color={Colors.shades.white}
|
|
478
|
+
size={18}
|
|
479
|
+
/>}
|
|
480
|
+
settings={settings.filter(s => s.setting_type == 'notification')}
|
|
481
|
+
player_settings={player_settings}
|
|
482
|
+
onUpdatePlayerSetting={onUpdatePlayerSetting}
|
|
483
|
+
/>
|
|
484
|
+
:active_step?.check == 'preferences' ?
|
|
485
|
+
<SettingsManager
|
|
486
|
+
title='Preferences'
|
|
487
|
+
description='hey this is desc'
|
|
488
|
+
icon={<Icons.NotificationIcon
|
|
489
|
+
color={Colors.shades.white}
|
|
490
|
+
size={20}
|
|
491
|
+
/>}
|
|
492
|
+
settings={settings.filter(s => s.setting_type == 'preference')}
|
|
493
|
+
player_settings={player_settings}
|
|
494
|
+
onUpdatePlayerSetting={onUpdatePlayerSetting}
|
|
495
|
+
/>
|
|
496
|
+
:active_step?.check == 'sharing' ?
|
|
497
|
+
<SettingsManager
|
|
498
|
+
title='Share Settings'
|
|
499
|
+
description='Set who can see your activity'
|
|
500
|
+
icon={<Icons.EyeOnIcon
|
|
501
|
+
color={Colors.shades.white}
|
|
502
|
+
size={20}
|
|
503
|
+
/>}
|
|
504
|
+
settings={settings.filter(s => s.setting_type == 'sharing')}
|
|
505
|
+
player_settings={player_settings}
|
|
506
|
+
onUpdatePlayerSetting={onUpdatePlayerSetting}
|
|
507
|
+
/>
|
|
508
|
+
:<></>}
|
|
451
509
|
</View>
|
|
452
510
|
</View>
|
|
453
511
|
}
|