be-components 3.5.2 → 3.5.3

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 (68) hide show
  1. package/lib/commonjs/Competition/index.js +7 -1
  2. package/lib/commonjs/Competition/index.js.map +1 -1
  3. package/lib/commonjs/SocialComponents/PostCard/components/DraftTextViewer.js.map +1 -1
  4. package/lib/commonjs/SocialComponents/PostCard/components/PostHeader.js +11 -9
  5. package/lib/commonjs/SocialComponents/PostCard/components/PostHeader.js.map +1 -1
  6. package/lib/commonjs/SocialComponents/PostCard/components/PostReactionBar.js +18 -18
  7. package/lib/commonjs/SocialComponents/PostCard/components/PostReactionBar.js.map +1 -1
  8. package/lib/commonjs/SocialComponents/PostCard/index.js +35 -35
  9. package/lib/commonjs/SocialComponents/PostCard/index.js.map +1 -1
  10. package/lib/commonjs/SocialComponents/SocialOrderCard.js +64 -48
  11. package/lib/commonjs/SocialComponents/SocialOrderCard.js.map +1 -1
  12. package/lib/commonjs/SocialComponents/SocialOrdersList.js +3 -2
  13. package/lib/commonjs/SocialComponents/SocialOrdersList.js.map +1 -1
  14. package/lib/commonjs/SocialComponents/index.js +7 -0
  15. package/lib/commonjs/SocialComponents/index.js.map +1 -1
  16. package/lib/module/Competition/index.js +8 -2
  17. package/lib/module/Competition/index.js.map +1 -1
  18. package/lib/module/SocialComponents/PostCard/components/DraftTextViewer.js.map +1 -1
  19. package/lib/module/SocialComponents/PostCard/components/PostHeader.js +8 -6
  20. package/lib/module/SocialComponents/PostCard/components/PostHeader.js.map +1 -1
  21. package/lib/module/SocialComponents/PostCard/components/PostReactionBar.js +14 -13
  22. package/lib/module/SocialComponents/PostCard/components/PostReactionBar.js.map +1 -1
  23. package/lib/module/SocialComponents/PostCard/index.js +30 -30
  24. package/lib/module/SocialComponents/PostCard/index.js.map +1 -1
  25. package/lib/module/SocialComponents/SocialOrderCard.js +46 -30
  26. package/lib/module/SocialComponents/SocialOrderCard.js.map +1 -1
  27. package/lib/module/SocialComponents/SocialOrdersList.js +2 -1
  28. package/lib/module/SocialComponents/SocialOrdersList.js.map +1 -1
  29. package/lib/module/SocialComponents/index.js +2 -1
  30. package/lib/module/SocialComponents/index.js.map +1 -1
  31. package/lib/typescript/lib/commonjs/Competition/index.d.ts.map +1 -1
  32. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/components/PostHeader.d.ts.map +1 -1
  33. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/components/PostReactionBar.d.ts.map +1 -1
  34. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/index.d.ts.map +1 -1
  35. package/lib/typescript/lib/commonjs/SocialComponents/SocialOrderCard.d.ts.map +1 -1
  36. package/lib/typescript/lib/commonjs/SocialComponents/SocialOrdersList.d.ts.map +1 -1
  37. package/lib/typescript/lib/commonjs/SocialComponents/index.d.ts +1 -0
  38. package/lib/typescript/lib/module/Competition/index.d.ts.map +1 -1
  39. package/lib/typescript/lib/module/SocialComponents/PostCard/components/PostHeader.d.ts +1 -2
  40. package/lib/typescript/lib/module/SocialComponents/PostCard/components/PostHeader.d.ts.map +1 -1
  41. package/lib/typescript/lib/module/SocialComponents/PostCard/components/PostReactionBar.d.ts +1 -2
  42. package/lib/typescript/lib/module/SocialComponents/PostCard/components/PostReactionBar.d.ts.map +1 -1
  43. package/lib/typescript/lib/module/SocialComponents/PostCard/index.d.ts.map +1 -1
  44. package/lib/typescript/lib/module/SocialComponents/SocialOrderCard.d.ts +1 -2
  45. package/lib/typescript/lib/module/SocialComponents/SocialOrderCard.d.ts.map +1 -1
  46. package/lib/typescript/lib/module/SocialComponents/SocialOrdersList.d.ts +1 -2
  47. package/lib/typescript/lib/module/SocialComponents/SocialOrdersList.d.ts.map +1 -1
  48. package/lib/typescript/lib/module/SocialComponents/index.d.ts +2 -1
  49. package/lib/typescript/lib/module/SocialComponents/index.d.ts.map +1 -1
  50. package/lib/typescript/src/Competition/index.d.ts.map +1 -1
  51. package/lib/typescript/src/SocialComponents/PostCard/components/DraftTextViewer.d.ts.map +1 -1
  52. package/lib/typescript/src/SocialComponents/PostCard/components/PostHeader.d.ts.map +1 -1
  53. package/lib/typescript/src/SocialComponents/PostCard/components/PostReactionBar.d.ts.map +1 -1
  54. package/lib/typescript/src/SocialComponents/PostCard/index.d.ts +4 -3
  55. package/lib/typescript/src/SocialComponents/PostCard/index.d.ts.map +1 -1
  56. package/lib/typescript/src/SocialComponents/SocialOrderCard.d.ts.map +1 -1
  57. package/lib/typescript/src/SocialComponents/SocialOrdersList.d.ts.map +1 -1
  58. package/lib/typescript/src/SocialComponents/index.d.ts +2 -1
  59. package/lib/typescript/src/SocialComponents/index.d.ts.map +1 -1
  60. package/package.json +1 -1
  61. package/src/Competition/index.tsx +19 -13
  62. package/src/SocialComponents/PostCard/components/DraftTextViewer.tsx +5 -4
  63. package/src/SocialComponents/PostCard/components/PostHeader.tsx +6 -7
  64. package/src/SocialComponents/PostCard/components/PostReactionBar.tsx +13 -14
  65. package/src/SocialComponents/PostCard/index.tsx +33 -26
  66. package/src/SocialComponents/SocialOrderCard.tsx +29 -28
  67. package/src/SocialComponents/SocialOrdersList.tsx +2 -1
  68. package/src/SocialComponents/index.tsx +3 -1
@@ -1,12 +1,12 @@
1
1
  import React, { useState } from 'react';
2
- import { View, Image } from 'react-native';
2
+ import { Image } from 'react-native';
3
3
  import type { AthleteProps, LeagueProps, OrderProps, PublicPlayerProps, TeamProps } from '../types';
4
- import { view_styles } from '../constants/styles';
5
- import { Button, Icons, Text } from '../Components';
4
+ import { Icons } from '../Components';
6
5
  import { SocialComponentApi, SocialOrderHelpers } from './api';
7
- import Colors from '../constants/colors';
8
6
  import moment from 'moment-mini';
9
7
  import { AthleteImage } from '../Components/Jerseys';
8
+ import { View, Button, Text } from '../Components/Themed';
9
+ import { useColors } from '../constants/useColors';
10
10
 
11
11
  type SocialOrderCardProps = {
12
12
  player?:PublicPlayerProps,
@@ -22,6 +22,7 @@ type SocialOrderCardProps = {
22
22
  onFadeOrder?:(order:OrderProps) => void
23
23
  }
24
24
  const SocialOrderCard = ({ player, show_player, maxWidth, league, team, athlete, order, contest_title, contest_time, onCopyOrder, onFadeOrder }:SocialOrderCardProps) => {
25
+ const Colors = useColors();
25
26
  const [ fade_loading, setFadeLoading ] = useState(false);
26
27
  const { result_label, color } = SocialOrderHelpers.getResultDetails(order)
27
28
 
@@ -50,26 +51,26 @@ const SocialOrderCard = ({ player, show_player, maxWidth, league, team, athlete,
50
51
  }
51
52
 
52
53
  return (
53
- <View style={{ ...view_styles.section, minWidth:175, maxWidth, borderWidth:1, borderColor:Colors.shades.shade600 }}>
54
+ <View float style={{ minWidth:275, maxWidth }}>
54
55
  {show_player && player ?
55
- <View style={{ ...view_styles.section_header, backgroundColor:Colors.shades.shade100 }}>
56
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
56
57
  <Image
57
58
  source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp' }}
58
59
  style={{ height:35, width:35, borderRadius:100 }}
59
60
  resizeMode='cover'
60
61
  />
61
- <View style={{ flex:1, marginLeft:10, marginRight:10 }}>
62
- <Text theme='header'>{player.first_name} {player.last_name}</Text>
63
- <Text theme='body_2' style={{ marginTop:3 }}>@{player.username}</Text>
62
+ <View transparent style={{ flex:1, marginLeft:10, marginRight:10 }}>
63
+ <Text theme='h1'>{player.first_name} {player.last_name}</Text>
64
+ <Text theme='description' style={{ marginTop:3 }}>@{player.username}</Text>
64
65
  </View>
65
66
  <Text size={14} color={color} weight='bold'>{result_label}</Text>
66
67
  </View>
67
68
  :<></>}
68
- <View style={{ ...view_styles.section_header }}>
69
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
69
70
 
70
- <View style={{ flex:1, marginRight:10 }}>
71
- <Text theme='body_2'>{contest_title}</Text>
72
- <Text style={{ marginTop:3 }} size={12} color={Colors.brand.slate} weight='regular'>{contest_time}</Text>
71
+ <View transparent style={{ flex:1, marginRight:10 }}>
72
+ <Text theme='description'>{contest_title}</Text>
73
+ <Text style={{ marginTop:3 }} size={12} theme='light' weight='regular'>{contest_time}</Text>
73
74
  </View>
74
75
  {league ?
75
76
  <Image
@@ -78,13 +79,13 @@ const SocialOrderCard = ({ player, show_player, maxWidth, league, team, athlete,
78
79
  resizeMode='cover'
79
80
  />
80
81
  :
81
- <View style={{ height:30, width:30, borderRadius:4, justifyContent:'center', alignItems:'center', backgroundColor:SocialOrderHelpers.getIconColor(order) }}>
82
- <Icons.ActivityIcon size={14} color={Colors.shades.white}/>
82
+ <View transparent style={{ height:30, width:30, borderRadius:4, justifyContent:'center', alignItems:'center', backgroundColor:SocialOrderHelpers.getIconColor(order) }}>
83
+ <Icons.ActivityIcon size={14} color={Colors.text.white}/>
83
84
  </View>
84
85
  }
85
86
  </View>
86
- <View style={{ ...view_styles.section_body, padding:10 }}>
87
- <View style={{ ...view_styles.body_row }}>
87
+ <View type='body' style={{ padding:10 }}>
88
+ <View transparent type='row' style={{ padding:5 }}>
88
89
  {team ?
89
90
  <Image
90
91
  source={{ uri: team.image?.url }}
@@ -97,26 +98,26 @@ const SocialOrderCard = ({ player, show_player, maxWidth, league, team, athlete,
97
98
  size={16}
98
99
  />
99
100
  :<></>}
100
- <View style={{ flex:1, marginLeft:10, marginRight:10 }}>
101
- <Text theme='header_2'>{order.title}</Text>
102
- <Text style={{ marginTop:3 }} theme='body_2'>Created on {moment(order.create_datetime).format('MM/DD hh:mm a')}</Text>
101
+ <View transparent style={{ flex:1, marginLeft:10, marginRight:10 }}>
102
+ <Text theme='h2'>{order.title}</Text>
103
+ <Text style={{ marginTop:3 }} theme='description'>Created on {moment(order.create_datetime).format('MM/DD hh:mm a')}</Text>
103
104
  </View>
104
- <View>
105
- <Text theme='header'>{SocialOrderHelpers.getOddsLabel(order.odds)}</Text>
105
+ <View transparent>
106
+ <Text theme='h1'>{SocialOrderHelpers.getOddsLabel(order.odds)}</Text>
106
107
  {!show_player ?
107
- <Text style={{ marginTop:3 }} size={14} color={color} weight='bold'>{result_label}</Text>
108
+ <Text style={{ marginTop:3 }} size={14} color={color} theme='h1'>{result_label}</Text>
108
109
  :<></>}
109
110
  </View>
110
111
  </View>
111
112
  </View>
112
113
  {order.resolution_status == 'inprogress' ?
113
- <View style={{ ...view_styles.body_row, padding:0 }}>
114
+ <View type='row' style={{ padding:0, borderBottomLeftRadius:8, borderBottomRightRadius:8 }}>
114
115
  {onCopyOrder ?
115
116
  <Button
116
117
  style={{ flex:1, borderRadius:0, borderBottomLeftRadius:8 }}
117
118
  title='Copy'
118
- title_color={Colors.shades.white}
119
- backgroundColor={Colors.brand.midnight}
119
+ title_color={Colors.text.white}
120
+ backgroundColor={Colors.absolutes.brand.midnight}
120
121
  onPress={() => onCopyOrder({
121
122
  ...order,
122
123
  buy_sell_ind:'buy',
@@ -139,8 +140,8 @@ const SocialOrderCard = ({ player, show_player, maxWidth, league, team, athlete,
139
140
  style={{ flex:1, borderRadius:0, borderBottomRightRadius:8, opacity:fade_loading?0.5:1 }}
140
141
  title='Fade'
141
142
  loading={fade_loading}
142
- title_color={Colors.shades.white}
143
- backgroundColor={Colors.brand.cyan}
143
+ title_color={Colors.text.white}
144
+ backgroundColor={Colors.absolutes.brand.cyan}
144
145
  onPress={() => handleFadeOrder()}
145
146
  />
146
147
  :<></>}
@@ -1,8 +1,9 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { View, FlatList } from 'react-native';
2
+ import { FlatList } from 'react-native';
3
3
  import type { AthleteProps, EventProps, LeagueProps, MatchProps, OrderProps, PublicPlayerProps, TeamProps, TournamentProps } from '../types';
4
4
  import SocialOrderCard from './SocialOrderCard';
5
5
  import { SocialComponentApi, SocialOrderHelpers } from './api';
6
+ import { View } from '../Components/Themed';
6
7
 
7
8
  type SocialOrdersListProps = {
8
9
  players:PublicPlayerProps[],
@@ -5,6 +5,7 @@ import CompanyProfile from './CompanyProfile';
5
5
  import PodcastModule from './PodcastModule';
6
6
  import AudioPlayer from "./AudioPlayer";
7
7
  import { useContacts } from "./Contacts/useContacts";
8
+ import PostCard from './PostCard';
8
9
  export {
9
10
  PlayerCard,
10
11
  PlayerList,
@@ -12,5 +13,6 @@ export {
12
13
  CompanyProfile,
13
14
  PodcastModule,
14
15
  AudioPlayer,
15
- useContacts
16
+ useContacts,
17
+ PostCard
16
18
  }