be-components 2.2.8 → 2.3.0
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/AdServer/index.js.map +1 -1
- package/lib/commonjs/ApiOverrides/index.js +6 -3
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- package/lib/commonjs/Competition/components/CompetitionPlay.js.map +1 -1
- package/lib/commonjs/Competition/index.js.map +1 -1
- package/lib/commonjs/Components/Icons.js +115 -0
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Components/TextInput.js +4 -0
- package/lib/commonjs/Components/TextInput.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventList/index.js +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventList/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/commonjs/Poll/index.js.map +1 -1
- package/lib/commonjs/Share/api/index.js +147 -0
- package/lib/commonjs/Share/api/index.js.map +1 -0
- package/lib/commonjs/Share/components/EmbedPreview.js +31 -0
- package/lib/commonjs/Share/components/EmbedPreview.js.map +1 -0
- package/lib/commonjs/Share/index.js +596 -0
- package/lib/commonjs/Share/index.js.map +1 -0
- package/lib/commonjs/Squares/index.js.map +1 -1
- package/lib/commonjs/Wallet/index.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/AdServer/index.js.map +1 -1
- package/lib/module/ApiOverrides/index.js +6 -3
- package/lib/module/ApiOverrides/index.js.map +1 -1
- package/lib/module/Competition/components/CompetitionPlay.js.map +1 -1
- package/lib/module/Competition/index.js.map +1 -1
- package/lib/module/Components/Icons.js +115 -0
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Components/TextInput.js +4 -0
- package/lib/module/Components/TextInput.js.map +1 -1
- package/lib/module/MarketComponents/components/TeamEventList/index.js +1 -1
- package/lib/module/MarketComponents/components/TeamEventList/index.js.map +1 -1
- package/lib/module/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
- package/lib/module/Poll/index.js.map +1 -1
- package/lib/module/Share/api/index.js +141 -0
- package/lib/module/Share/api/index.js.map +1 -0
- package/lib/module/Share/components/EmbedPreview.js +23 -0
- package/lib/module/Share/components/EmbedPreview.js.map +1 -0
- package/lib/module/Share/index.js +587 -0
- package/lib/module/Share/index.js.map +1 -0
- package/lib/module/Squares/index.js.map +1 -1
- package/lib/module/Wallet/index.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/AdServer/index.d.ts +1 -1
- package/lib/typescript/src/AdServer/index.d.ts.map +1 -1
- package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts +1 -2
- package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts.map +1 -1
- package/lib/typescript/src/Competition/index.d.ts +1 -2
- package/lib/typescript/src/Competition/index.d.ts.map +1 -1
- package/lib/typescript/src/Components/Icons.d.ts +4 -0
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/Components/TextInput.d.ts +3 -1
- package/lib/typescript/src/Components/TextInput.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts +1 -2
- package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/index.d.ts +1 -1
- package/lib/typescript/src/MarketComponents/index.d.ts.map +1 -1
- package/lib/typescript/src/Observer/api/index.d.ts +1 -1
- package/lib/typescript/src/Observer/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Poll/index.d.ts +1 -2
- package/lib/typescript/src/Poll/index.d.ts.map +1 -1
- package/lib/typescript/src/Share/api/index.d.ts +27 -0
- package/lib/typescript/src/Share/api/index.d.ts.map +1 -0
- package/lib/typescript/src/Share/components/EmbedPreview.d.ts +9 -0
- package/lib/typescript/src/Share/components/EmbedPreview.d.ts.map +1 -0
- package/lib/typescript/src/Share/index.d.ts +28 -0
- package/lib/typescript/src/Share/index.d.ts.map +1 -0
- package/lib/typescript/src/Squares/index.d.ts +1 -2
- package/lib/typescript/src/Squares/index.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/index.d.ts +1 -2
- package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/AdServer/index.tsx +1 -2
- package/src/ApiOverrides/index.ts +6 -5
- package/src/Competition/components/CompetitionPlay.tsx +1 -2
- package/src/Competition/index.tsx +1 -2
- package/src/Components/Icons.tsx +67 -0
- package/src/Components/TextInput.tsx +5 -1
- package/src/MarketComponents/components/TeamEventList/index.tsx +1 -1
- package/src/MarketComponents/components/TeamEventMarket/index.tsx +1 -2
- package/src/Observer/api/index.ts +1 -1
- package/src/Poll/index.tsx +1 -2
- package/src/Share/api/index.ts +114 -0
- package/src/Share/components/EmbedPreview.tsx +35 -0
- package/src/Share/index.tsx +370 -0
- package/src/Squares/index.tsx +1 -2
- package/src/Wallet/index.tsx +1 -2
- package/src/index.tsx +4 -1
- package/src/types.d.ts +38 -0
- package/lib/commonjs/Observer/api/types.d.js +0 -2
- package/lib/commonjs/Observer/api/types.d.js.map +0 -1
- package/lib/module/Observer/api/types.d.js +0 -2
- package/lib/module/Observer/api/types.d.js.map +0 -1
- package/src/Observer/api/types.d.ts +0 -38
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAA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a,EACb,QAAQ,EACR,UAAU,EACV,SAAS,EACT,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACb,CAAA"}
|
package/package.json
CHANGED
package/src/AdServer/index.tsx
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { createContext, useContext, useEffect, useState } from 'react';
|
|
2
2
|
import { View, Linking } from "react-native"
|
|
3
3
|
import { AdServerApi, AdServerHelpers } from './api';
|
|
4
|
-
import type { AdPlacementProps, AdTypeProps, CompanyAdvertisementProps } from '../types';
|
|
4
|
+
import type { AdPlacementProps, AdTypeProps, BEEventProps, CompanyAdvertisementProps } from '../types';
|
|
5
5
|
import CompanyAdCard from './components/CompanyAdCard';
|
|
6
|
-
import type { BEEventProps } from '../Observer/api/types';
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
type AdServerProps = {
|
|
@@ -18,8 +18,8 @@ const ENVIRONMENT_ENDPOINTS = {
|
|
|
18
18
|
WALLET_SVC_API: 'http://localhost:3012',
|
|
19
19
|
LOCATION_API: 'AIzaSyAZwcca9MedBHEedDdQmQG3AL9FMUwTvP0',
|
|
20
20
|
PAYPAL_CLIENT_ID: 'AWSlToJzIYpEfvKMPB6vSyi54Sc9LEv6R0axuLUsAiJTo42vhHMpdUkLKv3zeGuayhL-05dKgC09iaS6',
|
|
21
|
-
WS_SVC_API: 'ws://localhost:3000'
|
|
22
|
-
|
|
21
|
+
WS_SVC_API: 'ws://localhost:3000',
|
|
22
|
+
ANALYTICS_SVC_API: 'https://be-analytics-svc.herokuapp.com'
|
|
23
23
|
},
|
|
24
24
|
STAGING: {
|
|
25
25
|
AUTH_SVC_API: 'https://stage-be-auth-svc.herokuapp.com',
|
|
@@ -34,8 +34,8 @@ const ENVIRONMENT_ENDPOINTS = {
|
|
|
34
34
|
WALLET_SVC_API: 'https://stage-be-pay-svc.herokuapp.com',
|
|
35
35
|
LOCATION_API: 'AIzaSyAZwcca9MedBHEedDdQmQG3AL9FMUwTvP0',
|
|
36
36
|
PAYPAL_CLIENT_ID: 'AWSlToJzIYpEfvKMPB6vSyi54Sc9LEv6R0axuLUsAiJTo42vhHMpdUkLKv3zeGuayhL-05dKgC09iaS6',
|
|
37
|
-
WS_SVC_API: 'wss://stage-be-ws.herokuapp.com'
|
|
38
|
-
|
|
37
|
+
WS_SVC_API: 'wss://stage-be-ws.herokuapp.com',
|
|
38
|
+
ANALYTICS_SVC_API: 'https://be-analytics-svc.herokuapp.com'
|
|
39
39
|
},
|
|
40
40
|
PRODUCTION: {
|
|
41
41
|
AUTH_SVC_API: 'https://api.players.bettoredge.com',
|
|
@@ -50,7 +50,8 @@ const ENVIRONMENT_ENDPOINTS = {
|
|
|
50
50
|
WALLET_SVC_API: 'https://be-pay-svc.herokuapp.com',
|
|
51
51
|
LOCATION_API: 'AIzaSyAZwcca9MedBHEedDdQmQG3AL9FMUwTvP0',
|
|
52
52
|
PAYPAL_CLIENT_ID: 'AUZbVk4xEx5hlDu52ogVyUr4LhPF7eIYWrvxqEh_ebiAlbdg8HUvCZHnNgnW9_gmkI2lx4nX095STlAr',
|
|
53
|
-
WS_SVC_API: 'wss://be-ws.herokuapp.com'
|
|
53
|
+
WS_SVC_API: 'wss://be-ws.herokuapp.com',
|
|
54
|
+
ANALYTICS_SVC_API: 'https://be-analytics-svc.herokuapp.com'
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FlatList, TouchableOpacity, View } from "react-native"
|
|
3
|
-
import type { AthleteProps, CompetitionMatchMarketProps, CompetitionMatchProps, CompetitionPlayerProps, CompetitionProps, CompetitionTypeProps, LeagueProps, MarketProps, PlayerPickProps } from "../../types";
|
|
3
|
+
import type { AthleteProps, BEEventProps, CompetitionMatchMarketProps, CompetitionMatchProps, CompetitionPlayerProps, CompetitionProps, CompetitionTypeProps, LeagueProps, MarketProps, PlayerPickProps } from "../../types";
|
|
4
4
|
import Colors from '../../constants/colors';
|
|
5
5
|
import { useEffect, useState } from "react"
|
|
6
6
|
import TeamEventCard from './TeamEventCard';
|
|
@@ -13,7 +13,6 @@ import LinearGradient from "react-native-linear-gradient";
|
|
|
13
13
|
import { Icons, Text } from "../../Components";
|
|
14
14
|
import LinearDiagnal from "../../Components/LinearDiagnal";
|
|
15
15
|
import SpringView from "../../Components/Spring";
|
|
16
|
-
import type { BEEventProps } from "../../Observer/api/types";
|
|
17
16
|
|
|
18
17
|
type CompetitionPlayProps = {
|
|
19
18
|
player_id?:string,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { CompetitionApi, CompetitionHelpers, CompetitionMatchApi, CompetitionPlayerApi, PlayerPicksApi } from './api';
|
|
3
3
|
import { View, ScrollView, Image, TouchableOpacity, ActivityIndicator } from 'react-native';
|
|
4
|
-
import type { BEEventProps } from '../Observer/api/types';
|
|
5
4
|
import { view_styles } from '../constants/styles';
|
|
6
5
|
import { Button, Icons, Spring, Text } from '../Components';
|
|
7
6
|
import Colors from '../constants/colors';
|
|
8
|
-
import type { AthleteProps, CodeRequestProps, CompetitionMatchMarketProps, CompetitionMatchProps, CompetitionPayoutTypeProps, CompetitionPlayerProps, CompetitionProps, CompetitionResultTypeProps, CompetitionSeasonProps, CompetitionTypeProps, EventProps, LeagueProps, MarketProps, MatchProps, MyPlayerProps, PlayerBalanceProps, PlayerPickProps, PlayerReferralProps, PromoProps, PublicPlayerProps, RewardOptionProps, TeamProps, TournamentProps } from '../types';
|
|
7
|
+
import type { AthleteProps, BEEventProps, CodeRequestProps, CompetitionMatchMarketProps, CompetitionMatchProps, CompetitionPayoutTypeProps, CompetitionPlayerProps, CompetitionProps, CompetitionResultTypeProps, CompetitionSeasonProps, CompetitionTypeProps, EventProps, LeagueProps, MarketProps, MatchProps, MyPlayerProps, PlayerBalanceProps, PlayerPickProps, PlayerReferralProps, PromoProps, PublicPlayerProps, RewardOptionProps, TeamProps, TournamentProps } from '../types';
|
|
9
8
|
import CompetitionInfoCard from './components/CompetitionInfoCard';
|
|
10
9
|
import CompetitionLeaderboard from './components/CompetitionLeaderboard';
|
|
11
10
|
import WagerPickForm from './components/WagerPickForm';
|
package/src/Components/Icons.tsx
CHANGED
|
@@ -22,6 +22,56 @@ type IconProps = {
|
|
|
22
22
|
)
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
const EmbedIcon = ({ color, size }:IconProps) => {
|
|
26
|
+
const ratio = 0.58333
|
|
27
|
+
const width = size ?? 24
|
|
28
|
+
const height = width * ratio
|
|
29
|
+
return (
|
|
30
|
+
<svg width={`${width}px`} height={`${height}px`} viewBox="0 0 24 14" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
31
|
+
<title>embed-svgrepo-com (1)</title>
|
|
32
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
33
|
+
<g id="embed-svgrepo-com-(1)" fill={color ?? Colors.brand.midnight} fill-rule="nonzero">
|
|
34
|
+
<path d="M7.19657813,1.1409375 C7.18298438,1.1409375 7.16934375,1.1450625 7.15785938,1.15303125 L0.030046875,6.01879688 C0.01115625,6.0316875 0,6.05282813 0,6.07589062 L0,7.3846875 C0,7.407375 0.01115625,7.42889063 0.030046875,7.44140625 L7.15785938,12.3075469 C7.16939063,12.3155156 7.18298438,12.3196406 7.19657813,12.3196406 C7.20773438,12.3196406 7.21851563,12.3166406 7.22873438,12.3117187 C7.25142188,12.299625 7.26539063,12.2761875 7.26539063,12.2505 L7.26539063,10.1655937 C7.26539063,10.1432812 7.25423438,10.1217188 7.23534375,10.10925 L2.28604688,6.7299375 L7.23534375,3.35175 C7.25423437,3.33853125 7.26539063,3.31734375 7.26539063,3.29428125 L7.26539063,1.210125 C7.26539063,1.1844375 7.25142188,1.16095312 7.22873437,1.14923437 C7.21851563,1.14360938 7.20773438,1.1409375 7.19657813,1.1409375 Z" id="Path"></path>
|
|
35
|
+
<path d="M23.9699063,6.01879688 L16.8420938,1.15303125 C16.8305625,1.14510938 16.8169687,1.1409375 16.8033281,1.1409375 C16.7921719,1.1409375 16.7814375,1.1435625 16.7712187,1.14923437 C16.7485312,1.16095312 16.7345625,1.1844375 16.7345625,1.210125 L16.7345625,3.29503125 C16.7345625,3.31771875 16.7457187,3.33890625 16.7646094,3.35175 L21.7139531,6.7299375 L16.7646094,10.10925 C16.7457187,10.1217188 16.7345625,10.1432344 16.7345625,10.1662969 L16.7345625,12.2504531 C16.7345625,12.2761406 16.7485312,12.299625 16.7712187,12.3116719 C16.7814375,12.3165937 16.7922187,12.3195937 16.8033281,12.3195937 C16.8169687,12.3195937 16.8305625,12.3154687 16.8420938,12.3075 L23.9699063,7.44135937 C23.9888438,7.42884375 24,7.40732812 24,7.38464062 L24,6.07584375 C24,6.05282813 23.9888438,6.0316875 23.9699063,6.01879688 Z" id="Path"></path>
|
|
36
|
+
<path d="M15.2581406,0 L13.2658594,0 C13.236375,0 13.2102656,0.018515625 13.2008438,0.046125 L8.67660938,13.1657344 C8.6694375,13.1865 8.67292113,13.2099375 8.68570313,13.2277031 C8.69873438,13.2458438 8.71954688,13.2568125 8.74185938,13.2568125 L10.7343281,13.2568125 C10.763625,13.2568125 10.7897344,13.2382969 10.7993438,13.2103125 L15.3233906,0.0915 C15.3305625,0.0703125 15.3271875,0.046875 15.3143438,0.028734375 C15.3012656,0.01096875 15.2804063,0 15.2581406,0 Z" id="Path"></path>
|
|
37
|
+
</g>
|
|
38
|
+
</g>
|
|
39
|
+
</svg>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const TwitterXIcon = ({ size }:IconProps) => {
|
|
44
|
+
const ratio = 0.9166
|
|
45
|
+
const width = size ?? 24
|
|
46
|
+
const height = width * ratio
|
|
47
|
+
return (
|
|
48
|
+
<svg width={`${width}px`} height={`${height}px`} viewBox="0 0 24 22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
49
|
+
<title>x-social-media-black-icon</title>
|
|
50
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
51
|
+
<g id="x-social-media-black-icon" fill="#000000">
|
|
52
|
+
<path d="M18.9013594,0 L22.5813281,0 L14.5415156,9.189375 L24,21.6937031 L16.5938438,21.6937031 L10.7934844,14.1097031 L4.15635938,21.6937031 L0.473859375,21.6937031 L9.0733125,11.8648125 L0,0 L7.59370312,0 L12.8369531,6.931875 L18.9013594,0 Z M17.6096719,19.4908594 L19.6489688,19.4908594 L6.48576562,2.08720313 L4.29764062,2.08720313 L17.6096719,19.4908594 Z" id="Shape"></path>
|
|
53
|
+
</g>
|
|
54
|
+
</g>
|
|
55
|
+
</svg>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const FacebookIcon = ({ size }:IconProps) => {
|
|
60
|
+
const ratio = 0.625
|
|
61
|
+
const height = size ?? 24
|
|
62
|
+
const width = height * ratio
|
|
63
|
+
return (
|
|
64
|
+
<svg width={`${width}px`} height={`${height}px`} viewBox="0 0 15 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
65
|
+
<title>facebook-svgrepo-com</title>
|
|
66
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
67
|
+
<g id="facebook-svgrepo-com" fill={'#1877F2'} fill-rule="nonzero">
|
|
68
|
+
<path d="M9.6,4.8 L13.2,4.8 C13.8627417,4.8 14.4,4.2627417 14.4,3.6 L14.4,1.2 C14.4,0.5372583 13.8627417,0 13.2,0 L9.6,0 C6.2862915,0 3.6,2.6862915 3.6,6 L3.6,9.6 L1.2,9.6 C0.5372583,9.6 0,10.1372583 0,10.8 L0,13.2 C0,13.8627417 0.5372583,14.4 1.2,14.4 L3.6,14.4 L3.6,22.8 C3.6,23.4627417 4.1372583,24 4.8,24 L7.2,24 C7.8627417,24 8.4,23.4627417 8.4,22.8 L8.4,14.4 L11.064,14.4 C11.6288366,14.4164563 12.1286214,14.0366199 12.264,13.488 L12.864,11.088 C12.9542216,10.7237571 12.8688603,10.3382804 12.633296,10.0461807 C12.3977316,9.7540809 12.0390889,9.58899256 11.664,9.6 L8.4,9.6 L8.4,6 C8.4,5.3372583 8.9372583,4.8 9.6,4.8 Z" id="primary"></path>
|
|
69
|
+
</g>
|
|
70
|
+
</g>
|
|
71
|
+
</svg>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
25
75
|
const PodiumIcon = ({ color, size, secondary_color }:IconProps) => {
|
|
26
76
|
const icon_size = size ?? 20
|
|
27
77
|
|
|
@@ -1247,6 +1297,19 @@ const SelectorIcon = ({ color, size }:IconProps) => {
|
|
|
1247
1297
|
)
|
|
1248
1298
|
}
|
|
1249
1299
|
|
|
1300
|
+
const InstagramIcon = ({ size }: IconProps) => {
|
|
1301
|
+
return (
|
|
1302
|
+
<svg width={`${size ?? 18}`} height={`${size ?? 18}`} viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
1303
|
+
<title>instagram-167-svgrepo-com</title>
|
|
1304
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
1305
|
+
<g id="instagram-167-svgrepo-com" fill={'#fccc63'} fill-rule="nonzero">
|
|
1306
|
+
<path d="M7.04358393,0.14727253 C5.09012398,0.235412546 3.39696687,0.713036633 2.02978382,2.07444888 C0.657824771,3.44301313 0.186176686,5.14269344 0.0978170697,7.07583379 C0.0428906598,8.28241001 -0.278307399,17.3978157 0.653048771,19.7883361 C1.28111688,21.4010644 2.51814911,22.6409886 4.14563381,23.2710727 C4.90504674,23.5664648 5.7719245,23.7665648 7.04358393,23.8249328 C17.6765639,24.3061329 21.618111,24.0440889 23.2802229,19.7883361 C23.5751517,19.0308 23.7781402,18.1648798 23.8342606,16.8963716 C24.3202367,6.23612164 23.755453,3.92540122 21.9022938,2.07444888 C20.4324232,0.608216614 18.7034436,-0.389907567 7.04358393,0.14727253 M7.14149555,21.6809764 C5.97730094,21.6285604 5.34564962,21.4344124 4.92415195,21.2712364 C3.86383895,20.8591203 3.06740961,20.0658601 2.65785193,19.011744 C1.94858821,17.1953276 2.18381585,8.56827406 2.24710026,7.17231381 C2.30919067,5.80493756 2.58620952,4.55548533 3.5509989,3.59070916 C4.74504471,2.39961294 6.28775179,1.81598083 16.7917761,2.29004092 C18.1625412,2.35197293 19.4150954,2.62830898 20.3822728,3.59070916 C21.5763186,4.78179337 22.1685655,6.33616565 21.6861714,16.7998916 C21.633633,17.9612038 21.4390037,18.5912879 21.2754197,19.011744 C20.1948075,21.7810205 17.7088031,22.1657405 7.14149555,21.6809764 M16.9075989,5.62746953 C16.9075989,6.41597767 17.548801,7.05677779 18.3404544,7.05677779 C19.1321065,7.05677779 19.7745038,6.41597767 19.7745038,5.62746953 C19.7745038,4.83897338 19.1321065,4.19816127 18.3404544,4.19816127 C17.548801,4.19816127 16.9075989,4.83897338 16.9075989,5.62746953 M5.83520891,11.9855027 C5.83520891,15.3634313 8.58032101,18.1017478 11.9666352,18.1017478 C15.3529506,18.1017478 18.0980627,15.3634313 18.0980627,11.9855027 C18.0980627,8.60757407 15.3529506,5.87045757 11.9666352,5.87045757 C8.58032101,5.87045757 5.83520891,8.60757407 5.83520891,11.9855027 M7.9868801,11.9855027 C7.9868801,9.79390628 9.76839683,8.01560196 11.9666352,8.01560196 C14.1648748,8.01560196 15.9463915,9.79390628 15.9463915,11.9855027 C15.9463915,14.1782991 14.1648748,15.9565914 11.9666352,15.9565914 C9.76839683,15.9565914 7.9868801,14.1782991 7.9868801,11.9855027" id="instagram-[#167]"></path>
|
|
1307
|
+
</g>
|
|
1308
|
+
</g>
|
|
1309
|
+
</svg>
|
|
1310
|
+
)
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1250
1313
|
const LiquidityIcon = ({ color, size }:IconProps) => {
|
|
1251
1314
|
const ratio = 0.65
|
|
1252
1315
|
let width = size ?? 20
|
|
@@ -1417,13 +1480,16 @@ export default {
|
|
|
1417
1480
|
WithdrawIcon,
|
|
1418
1481
|
DepositIcon,
|
|
1419
1482
|
BankInstantIcon,
|
|
1483
|
+
FacebookIcon,
|
|
1420
1484
|
CreditCardIcon,
|
|
1421
1485
|
PlaidIcon,
|
|
1422
1486
|
SettingsIcon,
|
|
1423
1487
|
PayPalIcon,
|
|
1488
|
+
EmbedIcon,
|
|
1424
1489
|
ChevronIcon,
|
|
1425
1490
|
ActivityIcon,
|
|
1426
1491
|
ShareSocialIcon,
|
|
1492
|
+
InstagramIcon,
|
|
1427
1493
|
HeadToHeadIcon,
|
|
1428
1494
|
EdgeCoinIcon,
|
|
1429
1495
|
PacerCarIcon,
|
|
@@ -1431,6 +1497,7 @@ export default {
|
|
|
1431
1497
|
TVIcon,
|
|
1432
1498
|
PlusCircleIcon,
|
|
1433
1499
|
PausedIcon,
|
|
1500
|
+
TwitterXIcon,
|
|
1434
1501
|
ChangeIcon,
|
|
1435
1502
|
USDIcon,
|
|
1436
1503
|
EyeOffIcon,
|
|
@@ -8,6 +8,7 @@ type TextInputProps = {
|
|
|
8
8
|
key?:string,
|
|
9
9
|
placeholder?:string,
|
|
10
10
|
autoFocus?:boolean,
|
|
11
|
+
multiline?:boolean,
|
|
11
12
|
keyboardType?:string,
|
|
12
13
|
textContentType?:string,
|
|
13
14
|
editable?:boolean,
|
|
@@ -16,12 +17,13 @@ type TextInputProps = {
|
|
|
16
17
|
onBlur?: (evt:any) => void,
|
|
17
18
|
placeholderTextColor?:string,
|
|
18
19
|
onChangeText:(text:string) => void,
|
|
20
|
+
onContentSizeChange?:(data:any) => void,
|
|
19
21
|
style?:any
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
const STANDARD_SIZE = 414
|
|
23
25
|
|
|
24
|
-
const TextInput = ({ onChangeText, key, placeholderTextColor, value, placeholder, style, autoFocus, keyboardType, textContentType, editable, secureTextEntry, onSubmitEditing, onBlur } : TextInputProps) => {
|
|
26
|
+
const TextInput = ({ onChangeText, key, placeholderTextColor, value, placeholder, style, autoFocus, multiline, keyboardType, textContentType, editable, secureTextEntry, onContentSizeChange, onSubmitEditing, onBlur } : TextInputProps) => {
|
|
25
27
|
const dimensions = useWindowDimensions();
|
|
26
28
|
|
|
27
29
|
let rendered_size = style?.fontSize ?? 14
|
|
@@ -34,6 +36,8 @@ const TextInput = ({ onChangeText, key, placeholderTextColor, value, placeholder
|
|
|
34
36
|
return (
|
|
35
37
|
<RNTextInput
|
|
36
38
|
key={key}
|
|
39
|
+
onContentSizeChange={onContentSizeChange}
|
|
40
|
+
multiline={multiline ? true : false}
|
|
37
41
|
style={{
|
|
38
42
|
padding:15,
|
|
39
43
|
borderRadius:22,
|
|
@@ -85,7 +85,7 @@ const TeamEventList = ({ events, show_grades, show_id, list_key, distinct_id, in
|
|
|
85
85
|
<TeamEventMarket
|
|
86
86
|
event={data.item}
|
|
87
87
|
show_grades={show_grades}
|
|
88
|
-
show_id={show_id ? 'true' :
|
|
88
|
+
show_id={show_id ? 'true' : undefined}
|
|
89
89
|
markets={markets}
|
|
90
90
|
init_expanded={init_expanded}
|
|
91
91
|
latest_trades={lts}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { View, Image, FlatList, TouchableOpacity, ActivityIndicator, ScrollView } from 'react-native';
|
|
3
|
-
import type { AthleteProps, BestAvailableOrderProps, CompanyProps, CompetitionProps, EventOrderStatProps, EventProps, MarketProps, MarketSideOptionProps, OrderProps, SquaresCompetitionProps, TradeProps } from '../../../types';
|
|
3
|
+
import type { AthleteProps, BEEventProps, BestAvailableOrderProps, CompanyProps, CompetitionProps, EventOrderStatProps, EventProps, MarketProps, MarketSideOptionProps, OrderProps, SquaresCompetitionProps, TradeProps } from '../../../types';
|
|
4
4
|
import { view_styles } from '../../../constants/styles';
|
|
5
5
|
import { Button, Icons, LinearDiagnal, Text } from '../../../Components';
|
|
6
6
|
import {TeamEventMarketHelpers} from './api';
|
|
@@ -13,7 +13,6 @@ import { MarketComponentApi, MarketComponentHelpers } from '../../api';
|
|
|
13
13
|
import { MarketButtonHelpers } from '../MarketButton/api';
|
|
14
14
|
import LinearGradient from 'react-native-linear-gradient';
|
|
15
15
|
import { useIsInViewport } from '../../../Components/ViewportObserver';
|
|
16
|
-
import type { BEEventProps } from '../../../Observer/api/types';
|
|
17
16
|
import ContestStatsCard from '../ContestStats';
|
|
18
17
|
|
|
19
18
|
type TeamEventMarketProps = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import type { BEEventProps, GeneratedLinkProps } from '
|
|
2
|
+
import type { BEEventProps, GeneratedLinkProps } from '../../types';
|
|
3
3
|
export { BEEventApi, BELinkApi }
|
|
4
4
|
|
|
5
5
|
const ANALYTICS_SVC_API = 'https://be-analytics-svc.herokuapp.com';
|
package/src/Poll/index.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { PollApi, PollCampaignApi, PollResponseApi } from './api';
|
|
3
3
|
import { View, ScrollView, ActivityIndicator } from 'react-native';
|
|
4
|
-
import type { PollCampaignGoalProps, PollCampaignProps, PollOptionProps, PollProps, PollResponseProps } from '../types';
|
|
4
|
+
import type { BEEventProps, PollCampaignGoalProps, PollCampaignProps, PollOptionProps, PollProps, PollResponseProps } from '../types';
|
|
5
5
|
import Colors from '../constants/colors';
|
|
6
6
|
import CampaignHeader from './components/CampaignHeader';
|
|
7
7
|
import CampaignProgressBar from './components/CampaignProgressBar';
|
|
@@ -11,7 +11,6 @@ import { Spring } from '../Components';
|
|
|
11
11
|
import CampaignResult from './components/CampaignResult';
|
|
12
12
|
import CampaignLeaderboard from './components/CampaignLeaderboard';
|
|
13
13
|
import PollCard from './components/PollCard';
|
|
14
|
-
import type { BEEventProps } from '../Observer/api/types';
|
|
15
14
|
import SocketManager from '../Socket';
|
|
16
15
|
|
|
17
16
|
type PollCampaignModuleProps = {
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { APIOverrides } from "../../ApiOverrides";
|
|
3
|
+
import type { BEEventProps, GeneratedLinkProps } from '../../types';
|
|
4
|
+
import { Platform, Share } from 'react-native';
|
|
5
|
+
let ANALYTICS_SVC_API = '';
|
|
6
|
+
|
|
7
|
+
export { ShareApi, ShareHelpers }
|
|
8
|
+
|
|
9
|
+
const ShareApi = {
|
|
10
|
+
setEnvironment: () => {
|
|
11
|
+
const endpoints = APIOverrides.getEndpoints();
|
|
12
|
+
ANALYTICS_SVC_API = endpoints['ANALYTICS_SVC_API'] as string;
|
|
13
|
+
},
|
|
14
|
+
generateShortLink: async(generated_link:GeneratedLinkProps):Promise<{ generated_link:GeneratedLinkProps, url:string }> => {
|
|
15
|
+
try {
|
|
16
|
+
console.log('generating!!!')
|
|
17
|
+
const resp = await axios.post(`${ANALYTICS_SVC_API}/v1/links/redirect/generate`, { generated_link })
|
|
18
|
+
return { generated_link:resp.data.generated_link, url: `https://share.mybe.app/id/${resp.data.generated_link.visible_id}` }
|
|
19
|
+
} catch (e) {
|
|
20
|
+
console.log(e)
|
|
21
|
+
return { generated_link, url: generated_link.redirect_url }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
getGeneratedLinkById: async(generated_link_id:string):Promise<{ generated_link:GeneratedLinkProps, url:string } | undefined> => {
|
|
25
|
+
try {
|
|
26
|
+
const resp = await axios.get(`${ANALYTICS_SVC_API}/v1/links/link/${generated_link_id}`);
|
|
27
|
+
return { generated_link: resp.data.generated_link, url: `https://share.mybe.app/id/${resp.data.generated_link.visible_id}`}
|
|
28
|
+
} catch (e) {
|
|
29
|
+
return undefined
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
updateGeneratedLink: async(generated_link:GeneratedLinkProps):Promise<{ url:string, generated_link:GeneratedLinkProps } | undefined> => {
|
|
33
|
+
try {
|
|
34
|
+
const resp = await axios.post(`${ANALYTICS_SVC_API}/v1/links/redirect/update`, { generated_link })
|
|
35
|
+
return { url: `https://share.mybe.app/id/${resp.data.generated_link.visible_id}`, generated_link: resp.data.generated_link }
|
|
36
|
+
} catch (e) {
|
|
37
|
+
console.log(e);
|
|
38
|
+
return undefined
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
isGeneratedLinkAvailable: async(generated_link:GeneratedLinkProps):Promise<boolean> => {
|
|
42
|
+
try {
|
|
43
|
+
const resp = await axios.post(`${ANALYTICS_SVC_API}/v1/links/redirect/available`, { generated_link })
|
|
44
|
+
return resp.data.is_available
|
|
45
|
+
} catch (e) {
|
|
46
|
+
console.log(e);
|
|
47
|
+
return false
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
share: async(title:string, text?:string, link?:string, generated_link_id?:string):Promise<BEEventProps | undefined> => {
|
|
51
|
+
try {
|
|
52
|
+
if (Platform.OS === 'web') {
|
|
53
|
+
if (navigator.share) {
|
|
54
|
+
const resp = await navigator.share({
|
|
55
|
+
title,
|
|
56
|
+
text:text,
|
|
57
|
+
url: link
|
|
58
|
+
})
|
|
59
|
+
console.log(resp)
|
|
60
|
+
return {
|
|
61
|
+
event_name: 'generated_link',
|
|
62
|
+
event_data: {
|
|
63
|
+
generated_link_id
|
|
64
|
+
},
|
|
65
|
+
level:1
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
console.log('DIDNT SHARE!!!')
|
|
69
|
+
// Fallback for browsers that don't support Web Share API
|
|
70
|
+
alert('Sharing is not supported in this browser.');
|
|
71
|
+
return undefined
|
|
72
|
+
}
|
|
73
|
+
} else {
|
|
74
|
+
await Share.share({
|
|
75
|
+
message: text,
|
|
76
|
+
url: link ?? '',
|
|
77
|
+
});
|
|
78
|
+
return {
|
|
79
|
+
event_name: 'generated_link',
|
|
80
|
+
event_data: {
|
|
81
|
+
generated_link_id
|
|
82
|
+
},
|
|
83
|
+
level:1
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.error('Error sharing:', error);
|
|
88
|
+
return undefined
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
const ShareHelpers = {
|
|
95
|
+
nativeShareAvailable : () => {
|
|
96
|
+
if(!navigator){ return false }
|
|
97
|
+
if(!navigator.share){ return false }
|
|
98
|
+
return true
|
|
99
|
+
},
|
|
100
|
+
extractQueryParams: (url?:string):{ key:string, value:string }[] => {
|
|
101
|
+
if(!url){ return [] }
|
|
102
|
+
let query_params:{key:string, value:string}[] = []
|
|
103
|
+
const parsedPath2 = url.split(/[?&]/)
|
|
104
|
+
parsedPath2.map(p => {
|
|
105
|
+
let vars = p.split('=')
|
|
106
|
+
if(vars.length !== 2){ return }
|
|
107
|
+
const queryVariable = vars[0]
|
|
108
|
+
const queryValue = vars[1]
|
|
109
|
+
if(!queryVariable || !queryValue){ return }
|
|
110
|
+
query_params.push({ key: queryVariable, value: queryValue })
|
|
111
|
+
})
|
|
112
|
+
return query_params
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
type EmbedPreviewProps = {
|
|
5
|
+
widget_element: any,
|
|
6
|
+
script_source:string,
|
|
7
|
+
div_id:string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const EmbedPreview = ({ div_id, widget_element, script_source } : EmbedPreviewProps) => {
|
|
11
|
+
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
initiateScript(script_source);
|
|
14
|
+
},[widget_element])
|
|
15
|
+
|
|
16
|
+
const initiateScript = (source:string) => {
|
|
17
|
+
const scriptRunTime = document.createElement('script');
|
|
18
|
+
const scriptMain = document.createElement('script');
|
|
19
|
+
scriptRunTime.src = 'https://widgets.bettoredge.com/widget.common.js'
|
|
20
|
+
scriptMain.src = source
|
|
21
|
+
const container = document.getElementById(div_id);
|
|
22
|
+
(container as HTMLElement).appendChild(scriptRunTime);
|
|
23
|
+
(container as HTMLElement).appendChild(scriptMain);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<View>
|
|
29
|
+
{widget_element}
|
|
30
|
+
</View>
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default EmbedPreview
|