be-components 4.3.0 → 4.3.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.
Files changed (53) hide show
  1. package/lib/commonjs/CompetitionManager/index.js +31 -2
  2. package/lib/commonjs/CompetitionManager/index.js.map +1 -1
  3. package/lib/commonjs/ProfileManager/Components/BettorVouch.js +83 -0
  4. package/lib/commonjs/ProfileManager/Components/BettorVouch.js.map +1 -0
  5. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js +2 -0
  6. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js.map +1 -1
  7. package/lib/commonjs/ProfileManager/Components/VouchCard.js +53 -19
  8. package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
  9. package/lib/commonjs/ProfileManager/index.js +2 -0
  10. package/lib/commonjs/ProfileManager/index.js.map +1 -1
  11. package/lib/module/CompetitionManager/index.js +31 -2
  12. package/lib/module/CompetitionManager/index.js.map +1 -1
  13. package/lib/module/ProfileManager/Components/BettorVouch.js +75 -0
  14. package/lib/module/ProfileManager/Components/BettorVouch.js.map +1 -0
  15. package/lib/module/ProfileManager/Components/ProfileWizard.js +2 -0
  16. package/lib/module/ProfileManager/Components/ProfileWizard.js.map +1 -1
  17. package/lib/module/ProfileManager/Components/VouchCard.js +54 -20
  18. package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
  19. package/lib/module/ProfileManager/index.js +2 -0
  20. package/lib/module/ProfileManager/index.js.map +1 -1
  21. package/lib/typescript/lib/commonjs/CompetitionManager/index.d.ts.map +1 -1
  22. package/lib/typescript/lib/commonjs/ProfileManager/Components/BettorVouch.d.ts +10 -0
  23. package/lib/typescript/lib/commonjs/ProfileManager/Components/BettorVouch.d.ts.map +1 -0
  24. package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfileWizard.d.ts +2 -1
  25. package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
  26. package/lib/typescript/lib/commonjs/ProfileManager/Components/VouchCard.d.ts +2 -1
  27. package/lib/typescript/lib/commonjs/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  28. package/lib/typescript/lib/commonjs/ProfileManager/index.d.ts +2 -1
  29. package/lib/typescript/lib/commonjs/ProfileManager/index.d.ts.map +1 -1
  30. package/lib/typescript/lib/module/CompetitionManager/index.d.ts.map +1 -1
  31. package/lib/typescript/lib/module/ProfileManager/Components/BettorVouch.d.ts +15 -0
  32. package/lib/typescript/lib/module/ProfileManager/Components/BettorVouch.d.ts.map +1 -0
  33. package/lib/typescript/lib/module/ProfileManager/Components/ProfileWizard.d.ts +2 -1
  34. package/lib/typescript/lib/module/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
  35. package/lib/typescript/lib/module/ProfileManager/Components/VouchCard.d.ts +2 -1
  36. package/lib/typescript/lib/module/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  37. package/lib/typescript/lib/module/ProfileManager/index.d.ts +2 -1
  38. package/lib/typescript/lib/module/ProfileManager/index.d.ts.map +1 -1
  39. package/lib/typescript/src/CompetitionManager/index.d.ts.map +1 -1
  40. package/lib/typescript/src/ProfileManager/Components/BettorVouch.d.ts +13 -0
  41. package/lib/typescript/src/ProfileManager/Components/BettorVouch.d.ts.map +1 -0
  42. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts +2 -1
  43. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
  44. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts +2 -1
  45. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  46. package/lib/typescript/src/ProfileManager/index.d.ts +2 -1
  47. package/lib/typescript/src/ProfileManager/index.d.ts.map +1 -1
  48. package/package.json +1 -1
  49. package/src/CompetitionManager/index.tsx +28 -2
  50. package/src/ProfileManager/Components/BettorVouch.tsx +89 -0
  51. package/src/ProfileManager/Components/ProfileWizard.tsx +3 -1
  52. package/src/ProfileManager/Components/VouchCard.tsx +49 -25
  53. package/src/ProfileManager/index.tsx +3 -1
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ type BettorVouchProps = {
3
+ VOUCHED_ID?: string;
4
+ VOUCHED_CALLBACK_URL: string;
5
+ VOUCHED_SANDBOX?: boolean;
6
+ first_name: string;
7
+ last_name: string;
8
+ email: string;
9
+ phone: string;
10
+ };
11
+ declare const BettorVouch: ({ VOUCHED_CALLBACK_URL, first_name, last_name, email, phone }: BettorVouchProps) => React.JSX.Element;
12
+ export default BettorVouch;
13
+ //# sourceMappingURL=BettorVouch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BettorVouch.d.ts","sourceRoot":"","sources":["../../../../../src/ProfileManager/Components/BettorVouch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,KAAK,gBAAgB,GAAG;IACpB,UAAU,CAAC,EAAC,MAAM,CAAC;IACnB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAC,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAC,MAAM,CAAC;IACjB,KAAK,EAAC,MAAM,CAAC;IACb,KAAK,EAAC,MAAM,CAAA;CACf,CAAA;AACD,QAAA,MAAM,WAAW,kEAAkE,gBAAgB,sBAyElG,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -18,6 +18,7 @@ type ProfileWizardProps = {
18
18
  };
19
19
  hidden_groups?: string[];
20
20
  hidden_levels?: string[];
21
+ view_mode?: 'desktop' | 'mobile';
21
22
  hidden_steps?: string[];
22
23
  init_walkthrough?: {
23
24
  level: 'basic' | 'verify';
@@ -37,6 +38,6 @@ type ProfileWizardProps = {
37
38
  onPlayerUpdate: (player: MyPlayerProps, attribute?: string) => void;
38
39
  onUpdatePlayerSetting: (player_setting: PlayerSettingProps) => void;
39
40
  };
40
- declare const ProfileWizard: ({ player, hide_powered_by, settings, player_settings, insets, onFocusPosition, onRedeemCode, init_walkthrough, show_welcome, onVouching, onNextStep, profile_attribute, width, hidden_groups, hidden_levels, hidden_steps, onUpdatePlayerSetting, onPlayerUpdate, onSelectLevel, onClose, onLogout }: ProfileWizardProps) => React.JSX.Element;
41
+ declare const ProfileWizard: ({ player, view_mode, hide_powered_by, settings, player_settings, insets, onFocusPosition, onRedeemCode, init_walkthrough, show_welcome, onVouching, onNextStep, profile_attribute, width, hidden_groups, hidden_levels, hidden_steps, onUpdatePlayerSetting, onPlayerUpdate, onSelectLevel, onClose, onLogout }: ProfileWizardProps) => React.JSX.Element;
41
42
  export default ProfileWizard;
42
43
  //# sourceMappingURL=ProfileWizard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileWizard.d.ts","sourceRoot":"","sources":["../../../../../src/ProfileManager/Components/ProfileWizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAoB,YAAY,EAAE,MAAM,cAAc,CAAA;AAarF,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOlL,KAAK,kBAAkB,GAAG;IACtB,MAAM,EAAC,aAAa,CAAC;IACrB,eAAe,EAAC,kBAAkB,EAAE,CAAC;IACrC,QAAQ,EAAC,YAAY,EAAE,CAAA;IACvB,YAAY,CAAC,EAAC,OAAO,CAAC;IACtB,UAAU,EAAC,CAAC,MAAM,EAAC,OAAO,KAAK,IAAI,CAAC;IACpC,KAAK,EAAC,MAAM,CAAC;IACb,eAAe,CAAC,EAAC,CAAC,QAAQ,EAAC,kBAAkB,KAAK,IAAI,CAAC;IACvD,eAAe,CAAC,EAAC,OAAO,CAAC;IACzB,MAAM,CAAC,EAAC;QAAE,GAAG,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAA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AC9B,KAAK,IAAI,CAAC;IACX,iBAAiB,CAAC,EAAC,OAAO,GAAC,OAAO,GAAC,OAAO,GAAC,KAAK,GAAC,UAAU,GAAC,OAAO,GAAC,cAAc,GAAC,aAAa,CAAC;IACjG,OAAO,EAAC,MAAM,IAAI,CAAC;IACnB,UAAU,EAAC,CAAC,IAAI,EAAC,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAC,MAAM,IAAI,CAAC;IACpB,aAAa,EAAC,CAAC,KAAK,EAAC,iBAAiB,KAAK,IAAI,CAAC;IAChD,cAAc,EAAC,CAAC,MAAM,EAAC,aAAa,EAAE,SAAS,CAAC,EAAC,MAAM,KAAK,IAAI,CAAA;IAChE,qBAAqB,EAAC,CAAC,cAAc,EAAC,kBAAkB,KAAK,IAAI,CAAA;CACpE,CAAA;AAGD,QAAA,MAAM,aAAa,oTAAqT,kBAAkB,sBAokBzV,CAAA;AAID,eAAe,aAAa,CAAA"}
@@ -3,6 +3,7 @@ import type { CodeRequestProps, MyPlayerProps, PlayerReferralProps, PromoProps,
3
3
  type VouchCardProps = {
4
4
  player: MyPlayerProps;
5
5
  walkthrough?: boolean;
6
+ view_mode?: 'desktop' | 'mobile';
6
7
  insets?: {
7
8
  top: number;
8
9
  bottom: number;
@@ -20,6 +21,6 @@ type VouchCardProps = {
20
21
  onClaimGift: () => void;
21
22
  onClose: () => void;
22
23
  };
23
- declare const VouchCard: ({ player, walkthrough, insets, code_details, onVouching, onPlayerUpdate, onClaimGift, onClose }: VouchCardProps) => React.JSX.Element;
24
+ declare const VouchCard: ({ player, view_mode, walkthrough, insets, code_details, onVouching, onPlayerUpdate, onClaimGift, onClose }: VouchCardProps) => React.JSX.Element;
24
25
  export default VouchCard;
25
26
  //# sourceMappingURL=VouchCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VouchCard.d.ts","sourceRoot":"","sources":["../../../../../src/ProfileManager/Components/VouchCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MA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C;IAC9B,MAAM,CAAC,EAAC;QAAE,GAAG,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,IAAI,CAAC,EAAC,MAAM,CAAC;QAAC,KAAK,CAAC,EAAC,MAAM,CAAA;KAAE,CAAC;IACnE,UAAU,EAAC,CAAC,MAAM,EAAC,OAAO,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE;QACV,YAAY,CAAC,EAAC,gBAAgB,CAAC;QAC/B,QAAQ,CAAC,EAAC,iBAAiB,CAAC;QAC5B,KAAK,CAAC,EAAC,UAAU,CAAC;QAClB,eAAe,CAAC,EAAC,mBAAmB,CAAA;KACvC,CAAA;IACD,cAAc,EAAC,CAAC,MAAM,EAAC,aAAa,KAAK,IAAI,CAAC;IAC9C,WAAW,EAAC,MAAM,IAAI,CAAC;IACvB,OAAO,EAAC,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,SAAS,+GAA+G,cAAc,sBAwS3I,CAAA;AAED,eAAe,SAAS,CAAA"}
@@ -15,6 +15,7 @@ type ProfileOverviewProps = {
15
15
  hidden_steps?: string[];
16
16
  hidden_levels?: string[];
17
17
  onClose: () => void;
18
+ view_mode?: 'desktop' | 'mobile';
18
19
  onFocusPosition?: (data: FocusPositionProps) => void;
19
20
  onVouchStart?: () => void;
20
21
  onLogout: () => void;
@@ -32,6 +33,6 @@ type ProfileOverviewProps = {
32
33
  level: 'verify' | 'basic';
33
34
  };
34
35
  };
35
- declare const ProfileManager: ({ profile_attribute, hide_profile_header, insets, player, hide_powered_by, onRedeemCode, onPlayerUpdate, onNextStep, onFocusPosition, onVouchStart, show_welcome, hidden_groups, hidden_steps, hidden_levels, walkthrough, onClose, onLogout }: ProfileOverviewProps) => React.JSX.Element;
36
+ declare const ProfileManager: ({ profile_attribute, view_mode, hide_profile_header, insets, player, hide_powered_by, onRedeemCode, onPlayerUpdate, onNextStep, onFocusPosition, onVouchStart, show_welcome, hidden_groups, hidden_steps, hidden_levels, walkthrough, onClose, onLogout }: ProfileOverviewProps) => React.JSX.Element;
36
37
  export default ProfileManager;
37
38
  //# sourceMappingURL=index.d.ts.map
@@ -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,gBAAgB,EAAE,kBAAkB,EAAE,aAAa,EAAsB,mBAAmB,EAAsB,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGnM,KAAK,oBAAoB,GAAG;IACxB,YAAY,CAAC,EAAC,OAAO,CAAC;IAEtB,eAAe,CAAC,EAAC,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAC,OAAO,CAAC;IAC7B,MAAM,CAAC,EAAC,aAAa,CAAC;IACtB,aAAa,CAAC,EAAC,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAC;QAAE,GAAG,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,CAAA;KAAE,CAAA;IAChE,YAAY,CAAC,EAAC,MAAM,EAAE,CAAC;IACvB,aAAa,CAAC,EAAC,MAAM,EAAE,CAAC;IACxB,OAAO,EAAC,MAAM,IAAI,CAAC;IACnB,eAAe,CAAC,EAAC,CAAC,IAAI,EAAC,kBAAkB,KAAK,IAAI,CAAC;IACnD,YAAY,CAAC,EAAC,MAAM,IAAI,CAAC;IACzB,QAAQ,EAAC,MAAM,IAAI,CAAC;IACpB,YAAY,EAAC,CAAC,YAAY,EAAC;QACvB,YAAY,CAAC,EAAC,gBAAgB,CAAC;QAC/B,KAAK,CAAC,EAAC,UAAU,CAAC;QAClB,eAAe,CAAC,EAAC,mBAAmB,CAAC;QACrC,aAAa,CAAC,EAAC,iBAAiB,CAAC;QACjC,QAAQ,CAAC,EAAC,iBAAiB,CA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,CAAC;IACnB,SAAS,CAAC,EAAC,SAAS,GAAC,QAAQ,CAAC;IAC9B,eAAe,CAAC,EAAC,CAAC,IAAI,EAAC,kBAAkB,KAAK,IAAI,CAAC;IACnD,YAAY,CAAC,EAAC,MAAM,IAAI,CAAC;IACzB,QAAQ,EAAC,MAAM,IAAI,CAAC;IACpB,YAAY,EAAC,CAAC,YAAY,EAAC;QACvB,YAAY,CAAC,EAAC,gBAAgB,CAAC;QAC/B,KAAK,CAAC,EAAC,UAAU,CAAC;QAClB,eAAe,CAAC,EAAC,mBAAmB,CAAC;QACrC,aAAa,CAAC,EAAC,iBAAiB,CAAC;QACjC,QAAQ,CAAC,EAAC,iBAAiB,CAAA;KAC9B,KAAK,IAAI,CAAC;IACX,UAAU,CAAC,EAAC,CAAC,IAAI,EAAC,MAAM,KAAK,IAAI,CAAC;IAClC,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,EAAE;QACV,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAA;KAC5B,CAAA;CACJ,CAAA;AAED,QAAA,MAAM,cAAc,8PAA+P,oBAAoB,sBAmHtS,CAAA;AAED,eAAe,cAAc,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "be-components",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "Components for BettorEdge Apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -397,12 +397,38 @@ const CompetitionManager = ({ player_id, competition_id, onClose, insets }:Compe
397
397
  setActionLoading(false)
398
398
  return alert('Already added this market!')
399
399
  }
400
+
401
+ //Create the new Competition Match
400
402
  const new_cm = await ManageCompetitionMatchApi.createCompetitionMatch(competition_id, contest_id, contest_type, market.level, market.market_id);
401
- setCompetitionData({
403
+ console.log('HERE!!!')
404
+ console.log(market.level);
405
+ if(market.level == 'event'){
406
+ //If the level is event - we need to create some events
407
+ let market_trades = trades.filter(t => t.market_type == 'FOR_MONEY' && t.event_id == contest_id && t.event_type == contest_type && t.market_id == market.market_id)
408
+ console.log(`market trades are ${market_trades.length}`)
409
+ let event_cmms:CompetitionMatchMarketProps[] = []
410
+ market_trades.map(t => {
411
+ event_cmms.push({ ...ManageCompetitionHelpers.createCompetitionMatchMarketFromTrade(t), competition_match_id: new_cm.competition_match_id })
412
+ })
413
+ if(event_cmms.length != 2){
414
+ setActionLoading(false)
415
+ return alert('Unable to add this market')
416
+ }
417
+ const new_event_cmms = await ManageCompetitionMatchApi.createCompetitionMatchMarkets(event_cmms);
418
+ console.log('saved event cmms')
419
+ console.log(new_event_cmms)
420
+ setActionLoading(false);
421
+ return setCompetitionData({
422
+ ...competition_data,
423
+ competition_matches: competition_matches.concat(new_cm),
424
+ competition_match_markets: competition_match_markets.filter(cmms => new_event_cmms.find(ncms => ncms.competition_match_market_id != cmms.competition_match_market_id)).concat(new_event_cmms)
425
+ })
426
+ }
427
+ setActionLoading(false)
428
+ return setCompetitionData({
402
429
  ...competition_data,
403
430
  competition_matches: competition_matches.concat(new_cm)
404
431
  })
405
- setActionLoading(false)
406
432
  }
407
433
 
408
434
 
@@ -0,0 +1,89 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+
3
+ type BettorVouchProps = {
4
+ VOUCHED_ID?:string,
5
+ VOUCHED_CALLBACK_URL: string,
6
+ VOUCHED_SANDBOX?:boolean,
7
+ first_name: string,
8
+ last_name:string,
9
+ email:string,
10
+ phone:string
11
+ }
12
+ const BettorVouch = ({ VOUCHED_CALLBACK_URL, first_name, last_name, email, phone }:BettorVouchProps) => {
13
+ const id = 'vouched-container';
14
+ const vouchedRef = useRef();
15
+
16
+ useEffect(() => {
17
+ // Assuming vouched is included via script tag or otherwise loaded
18
+ if (!window.Vouched || vouchedRef.current) {
19
+ return;
20
+ }
21
+
22
+ const instance = window.Vouched({
23
+ // your configuration
24
+ verification: {
25
+ // verify the user's information
26
+ firstName: first_name,
27
+ lastName: last_name,
28
+ // used for the crosscheck feature
29
+ email: email,
30
+ phone: phone,
31
+ enableIPAddress: true
32
+ },
33
+ id: 'camera',
34
+ face: 'camera',
35
+ showUploadFirst: false,
36
+ //token:player_vouch_token?.token,
37
+ appId: 'Q3tmJ3r9FnkN*n-MqS-!j0NS*k!mdo',
38
+ //appId: "adqEZph8t*_NBFy6u_l4!t~Hin6kpK", //SANDBOX
39
+ // your webhook for POST verification processing
40
+ callbackURL: VOUCHED_CALLBACK_URL,
41
+ sandbox: false,
42
+ // mobile handoff
43
+ crossDevice: true,
44
+ crossDeviceQRCode: true,
45
+ includeBackId: true,
46
+ //includeBarcode:true,
47
+ cameraScreenLabelBackId: 'Please turn ID over to capture back',
48
+ onInit: async() => {
49
+ // If crossDevice is true, a web token is created during initialization
50
+ // Your backend will save and associate the token the user.
51
+ //fetch(`/yourapi/idv?job_token=${job.token}&&user=${user.id}`);
52
+ //let pvt:PlayerVouchTokenProps = {
53
+ // player_vouch_token_id:'', player_id:player.player_id, token, create_datetime:'', last_update_datetime:'', status:'active'
54
+ //}
55
+ //await player_saveVouchToken(pvt)
56
+ },
57
+ onCamera: () => {
58
+ },
59
+ onDone: ()=> {
60
+ },
61
+ // theme
62
+ theme: {
63
+ name: 'verbose',
64
+ },
65
+ });
66
+
67
+ vouchedRef.current = instance;
68
+
69
+ instance
70
+ .mount(`#${id}`)
71
+ .then(() => {
72
+ // optionally await mounting, usually not required when using callbacks.
73
+ console.log('vouched mounted');
74
+ });
75
+
76
+ return () => {
77
+ instance.unmount(`#${id}`);
78
+ };
79
+ }, []);
80
+
81
+
82
+ return <div style={{ height:'100%' }} id={id} />
83
+
84
+
85
+ }
86
+
87
+ export default BettorVouch
88
+
89
+
@@ -32,6 +32,7 @@ type ProfileWizardProps = {
32
32
  insets?:{ top:number, bottom:number, left:number, right:number }
33
33
  hidden_groups?:string[],
34
34
  hidden_levels?:string[],
35
+ view_mode?:'desktop'|'mobile',
35
36
  hidden_steps?:string[],
36
37
  init_walkthrough?:{
37
38
  level: 'basic'|'verify'
@@ -53,7 +54,7 @@ type ProfileWizardProps = {
53
54
  }
54
55
  // { num:5, check: 'code', label: 'Promo', description: `Lets get you started with some promo bucks!`, complete:false },
55
56
 
56
- const ProfileWizard = ({ player, hide_powered_by, settings, player_settings, insets, onFocusPosition, onRedeemCode, init_walkthrough, show_welcome, onVouching, onNextStep, profile_attribute, width, hidden_groups, hidden_levels, hidden_steps, onUpdatePlayerSetting, onPlayerUpdate, onSelectLevel, onClose, onLogout }:ProfileWizardProps) => {
57
+ const ProfileWizard = ({ player, view_mode, hide_powered_by, settings, player_settings, insets, onFocusPosition, onRedeemCode, init_walkthrough, show_welcome, onVouching, onNextStep, profile_attribute, width, hidden_groups, hidden_levels, hidden_steps, onUpdatePlayerSetting, onPlayerUpdate, onSelectLevel, onClose, onLogout }:ProfileWizardProps) => {
57
58
  const C = useColors();
58
59
  const [ draft_player, setDraftPlayer ] = useState(player);
59
60
  const [ show_code_request, setShowCodeRequest ] = useState(false);
@@ -566,6 +567,7 @@ const ProfileWizard = ({ player, hide_powered_by, settings, player_settings, in
566
567
  <VouchCard
567
568
  player={draft_player}
568
569
  insets={insets}
570
+ view_mode={view_mode}
569
571
  onPlayerUpdate={(p) => onPlayerUpdate(p, 'vouched_status')}
570
572
  walkthrough={walkthrough == 'verify' ? true : false}
571
573
  code_details={code_details}
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { TouchableOpacity, Image, Modal, Alert, FlatList } from 'react-native';
2
+ import { TouchableOpacity, Image, Modal, Alert, FlatList, Platform } from 'react-native';
3
3
  import { Icons } from '../../Components';
4
4
  import Colors from '../../constants/colors';
5
5
  import { ProfileApi, ProfileHelpers } from '../api';
@@ -9,10 +9,12 @@ import { Button, Text, View } from '../../Components/Themed';
9
9
  import { useColors } from '../../constants/useColors';
10
10
  import WebView from 'react-native-webview';
11
11
  import type { PlayerTokenProps } from '../../Authenticator/api/types';
12
+ import BettorVouch from './BettorVouch';
12
13
 
13
14
  type VouchCardProps = {
14
15
  player:MyPlayerProps,
15
16
  walkthrough?:boolean,
17
+ view_mode?:'desktop'|'mobile',
16
18
  insets?:{ top:number, bottom:number, left?:number, right?:number },
17
19
  onVouching:(active:boolean) => void,
18
20
  code_details: {
@@ -26,15 +28,11 @@ type VouchCardProps = {
26
28
  onClose:() => void
27
29
  }
28
30
  const sections = ['header','info','image','disclaimer','code','failed']
29
- const VouchCard = ({ player, walkthrough, insets, code_details, onVouching, onPlayerUpdate, onClaimGift, onClose }:VouchCardProps) => {
31
+ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVouching, onPlayerUpdate, onClaimGift, onClose }:VouchCardProps) => {
30
32
  const C = useColors();
31
- //const [ permission, requestPermission ] = useCameraPermissions();
32
33
  const [ vouching, setVouching ] = useState(false);
33
34
  const [ vouch_loading, setVouchLoading ] = useState(false);
34
35
  const [ player_token, setPlayerToken ] = useState<PlayerTokenProps|undefined>(undefined);
35
- //const [ view_height, setViewHeight ] = useState(0);
36
- //const [ job_complete, setJobComplete ] = useState(false);
37
- //const [ vouched, setVouched ] = useState<any | undefined>(undefined)
38
36
  const [ disclaimer_confirmed, setDisclaimerConfirmed ] = useState(false);
39
37
  const [ id_disclaimer_confirmed, setIDDisclaimerConfirmed ] = useState(false);
40
38
  const [ info_visible, setInfoVisible ] = useState(false);
@@ -42,7 +40,15 @@ const VouchCard = ({ player, walkthrough, insets, code_details, onVouching, onPl
42
40
  const { code_request, promo } = code_details;
43
41
  useEffect(() => {
44
42
  getPlayerFromServer()
45
- },[])
43
+ if(Platform.OS != 'web'){ return }
44
+ const script = document.createElement('script');
45
+ script.src ="https://static.vouched.id/plugin/releases/latest/index.js"
46
+ script.async = true;
47
+ document.body.appendChild(script);
48
+ return () => {
49
+ document.body.removeChild(script); // Cleanup on component unmount
50
+ }
51
+ },[]);
46
52
 
47
53
  const getPlayerFromServer = async() => {
48
54
  const me = await ProfileApi.getMyDetails();
@@ -75,11 +81,15 @@ const VouchCard = ({ player, walkthrough, insets, code_details, onVouching, onPl
75
81
  if(me.vouched_status != 'unverified'){
76
82
  return onPlayerUpdate(me);
77
83
  }
78
- const player_token = await ProfileApi.getShortToken();
79
- if(!player_token){
80
- return Alert.alert('Unable to process at this time')
84
+ if(Platform.OS != 'web'){
85
+ //Only need to get this if not on web
86
+ const player_token = await ProfileApi.getShortToken();
87
+ console.log(player_token)
88
+ if(!player_token){
89
+ return Alert.alert('Unable to process at this time')
90
+ }
91
+ setPlayerToken(player_token);
81
92
  }
82
- setPlayerToken(player_token);
83
93
  setVouchLoading(false);
84
94
  setVouching(true);
85
95
  }
@@ -263,10 +273,12 @@ const VouchCard = ({ player, walkthrough, insets, code_details, onVouching, onPl
263
273
  <Modal
264
274
  visible={player?.vouched_status == 'unverified' && vouching && player_token ? true : false}
265
275
  transparent
266
- animationType='slide'
276
+ animationType={view_mode == 'desktop' ? 'fade' : 'slide'}
267
277
  style={{flex:1}}
268
278
  >
269
- <View type='blur' style={{flex:1, padding:10, paddingBottom:insets?.bottom, paddingTop:insets?.top}}>
279
+ <View type='blur' style={view_mode == 'desktop'?{ flex:1, justifyContent:'center', alignItems:'center' }:{ flex:1 }}>
280
+
281
+ <View style={view_mode == 'desktop'?{ flex:1, width:500, maxHeight:700 }:{flex:1, padding:10, paddingBottom:insets?.bottom, paddingTop:insets?.top}}>
270
282
  <View float style={{flex:1}} >
271
283
  <View type='header' style={{ flexDirection:'row', padding:10, borderTopRightRadius:8, borderTopLeftRadius: 8}}>
272
284
  <View transparent style={{flex:1}}>
@@ -274,18 +286,29 @@ const VouchCard = ({ player, walkthrough, insets, code_details, onVouching, onPl
274
286
  <Text style={{marginTop:4}} theme='description'>Use the prompts below to verify. Please reach out to support if you have any issues.</Text>
275
287
  </View>
276
288
  </View>
277
- {player?.vouched_status == 'unverified' && vouching && player_token ?
278
- <WebView
279
- source={{ uri: `https://verify.mybe.app/vouch/${player_token.token}` }}
280
- geolocationEnabled={true}
281
- mediaPlaybackRequiresUserAction={false}
282
- allowsInlineMediaPlayback
283
- javaScriptEnabled={true}
284
- onMessage={m => {
285
- console.log('received a message!!!!!!')
286
- console.log(m)
287
- }}
288
- />
289
+ {player?.vouched_status == 'unverified' && vouching ?
290
+ <View style={{ flex:1 }}>
291
+ {Platform.OS == 'web' ?
292
+ <BettorVouch
293
+ first_name={player.first_name}
294
+ last_name={player.last_name}
295
+ email={player.email}
296
+ phone={player.phone}
297
+ VOUCHED_CALLBACK_URL='https://be-auth-svc.herokuapp.com/v1/players/vouch/hook'
298
+
299
+ />
300
+ : player_token ?
301
+ <View style={{flex:1}}>
302
+ <WebView
303
+ source={{ uri: `https://play.bettoredge.com/account/verify?token=${player_token.token}` }}
304
+ geolocationEnabled={true}
305
+ mediaPlaybackRequiresUserAction={false}
306
+ allowsInlineMediaPlayback
307
+ javaScriptEnabled={true}
308
+ />
309
+ </View>
310
+ :<></>}
311
+ </View>
289
312
  :<></>}
290
313
  <View type='footer' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
291
314
  <Button
@@ -297,6 +320,7 @@ const VouchCard = ({ player, walkthrough, insets, code_details, onVouching, onPl
297
320
  </View>
298
321
  </View>
299
322
  </View>
323
+ </View>
300
324
  </Modal>
301
325
  </View>
302
326
  )
@@ -18,6 +18,7 @@ type ProfileOverviewProps = {
18
18
  hidden_steps?:string[],
19
19
  hidden_levels?:string[],
20
20
  onClose:() => void,
21
+ view_mode?:'desktop'|'mobile',
21
22
  onFocusPosition?:(data:FocusPositionProps) => void,
22
23
  onVouchStart?:() => void,
23
24
  onLogout:() => void,
@@ -36,7 +37,7 @@ type ProfileOverviewProps = {
36
37
  }
37
38
  }
38
39
 
39
- const ProfileManager = ({ profile_attribute, hide_profile_header, insets, player, hide_powered_by, onRedeemCode, onPlayerUpdate, onNextStep, onFocusPosition, onVouchStart, show_welcome, hidden_groups, hidden_steps, hidden_levels, walkthrough, onClose, onLogout }: ProfileOverviewProps ) => {
40
+ const ProfileManager = ({ profile_attribute, view_mode, hide_profile_header, insets, player, hide_powered_by, onRedeemCode, onPlayerUpdate, onNextStep, onFocusPosition, onVouchStart, show_welcome, hidden_groups, hidden_steps, hidden_levels, walkthrough, onClose, onLogout }: ProfileOverviewProps ) => {
40
41
  const [ width, setModuleWidth ] = useState(400);
41
42
  const [ loading, setLoading ] = useState(false);
42
43
  const [ vouching, setVouching ] = useState(false);
@@ -128,6 +129,7 @@ const ProfileManager = ({ profile_attribute, hide_profile_header, insets, player
128
129
  onRedeemCode={onRedeemCode}
129
130
  settings={settings}
130
131
  insets={insets}
132
+ view_mode={view_mode}
131
133
  show_welcome={show_welcome}
132
134
  onFocusPosition={onFocusPosition}
133
135
  hide_powered_by={hide_powered_by}