be-components 2.8.2 → 3.0.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.
Files changed (236) hide show
  1. package/lib/commonjs/ApiOverrides/index.js +3 -3
  2. package/lib/commonjs/ApiOverrides/index.js.map +1 -1
  3. package/lib/commonjs/Authenticator/Components/LoginForm.js +4 -1
  4. package/lib/commonjs/Authenticator/Components/LoginForm.js.map +1 -1
  5. package/lib/commonjs/Authenticator/Components/StrategyForm.js +6 -0
  6. package/lib/commonjs/Authenticator/Components/StrategyForm.js.map +1 -1
  7. package/lib/commonjs/Authenticator/api/index.js +4 -5
  8. package/lib/commonjs/Authenticator/api/index.js.map +1 -1
  9. package/lib/commonjs/Competition/components/AthleteMarketCard.js +1 -3
  10. package/lib/commonjs/Competition/components/AthleteMarketCard.js.map +1 -1
  11. package/lib/commonjs/Competition/components/CompetitionPlay.js +3 -3
  12. package/lib/commonjs/Competition/components/CompetitionPlay.js.map +1 -1
  13. package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js +1 -3
  14. package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js.map +1 -1
  15. package/lib/commonjs/Competition/index.js +9 -14
  16. package/lib/commonjs/Competition/index.js.map +1 -1
  17. package/lib/commonjs/Components/Button.js +3 -2
  18. package/lib/commonjs/Components/Button.js.map +1 -1
  19. package/lib/commonjs/Components/Icons.js +642 -942
  20. package/lib/commonjs/Components/Icons.js.map +1 -1
  21. package/lib/commonjs/Components/ImageUploader.js +96 -45
  22. package/lib/commonjs/Components/ImageUploader.js.map +1 -1
  23. package/lib/commonjs/Components/Jerseys.js +114 -124
  24. package/lib/commonjs/Components/Jerseys.js.map +1 -1
  25. package/lib/commonjs/Components/LinearDiagnal.js +2 -2
  26. package/lib/commonjs/Components/LinearDiagnal.js.map +1 -1
  27. package/lib/commonjs/Components/Spring.js +19 -7
  28. package/lib/commonjs/Components/Spring.js.map +1 -1
  29. package/lib/commonjs/Components/Text.js +6 -6
  30. package/lib/commonjs/Components/Text.js.map +1 -1
  31. package/lib/commonjs/Components/TextInput.js +2 -2
  32. package/lib/commonjs/Components/TextInput.js.map +1 -1
  33. package/lib/commonjs/Components/ViewportObserver.js +7 -0
  34. package/lib/commonjs/Components/ViewportObserver.js.map +1 -1
  35. package/lib/commonjs/EventComponents/TeamProfile/index.js +2 -2
  36. package/lib/commonjs/EventComponents/TeamProfile/index.js.map +1 -1
  37. package/lib/commonjs/Font.css +4 -4
  38. package/lib/commonjs/LocationTracker/LocationStatus.js +7 -4
  39. package/lib/commonjs/LocationTracker/LocationStatus.js.map +1 -1
  40. package/lib/commonjs/LocationTracker/api/index.js +225 -96
  41. package/lib/commonjs/LocationTracker/api/index.js.map +1 -1
  42. package/lib/commonjs/LocationTracker/index.js.map +1 -1
  43. package/lib/commonjs/MarketComponents/api/index.js +0 -2
  44. package/lib/commonjs/MarketComponents/api/index.js.map +1 -1
  45. package/lib/commonjs/MarketComponents/components/AthleteMarket/index.js +0 -2
  46. package/lib/commonjs/MarketComponents/components/AthleteMarket/index.js.map +1 -1
  47. package/lib/commonjs/MarketComponents/components/EventMarket/index.js +0 -1
  48. package/lib/commonjs/MarketComponents/components/EventMarket/index.js.map +1 -1
  49. package/lib/commonjs/MarketComponents/components/MatchMarket/index.js +1 -3
  50. package/lib/commonjs/MarketComponents/components/MatchMarket/index.js.map +1 -1
  51. package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js +6 -5
  52. package/lib/commonjs/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
  53. package/lib/commonjs/MarketComponents/components/TournamentMarket/index.js +10 -6
  54. package/lib/commonjs/MarketComponents/components/TournamentMarket/index.js.map +1 -1
  55. package/lib/commonjs/ProfileManager/Components/PasswordManager.js +8 -7
  56. package/lib/commonjs/ProfileManager/Components/PasswordManager.js.map +1 -1
  57. package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js +4 -1
  58. package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  59. package/lib/commonjs/SocialComponents/AudioPlayer.js +2 -3
  60. package/lib/commonjs/SocialComponents/AudioPlayer.js.map +1 -1
  61. package/lib/commonjs/SocialComponents/PlayerProfile/components/PostsList.js +60 -51
  62. package/lib/commonjs/SocialComponents/PlayerProfile/components/PostsList.js.map +1 -1
  63. package/lib/commonjs/SocialComponents/PlayerProfile/index.js +5 -7
  64. package/lib/commonjs/SocialComponents/PlayerProfile/index.js.map +1 -1
  65. package/lib/commonjs/Squares/components/BidForm.js +1 -7
  66. package/lib/commonjs/Squares/components/BidForm.js.map +1 -1
  67. package/lib/commonjs/Squares/components/BidToggle.js +0 -1
  68. package/lib/commonjs/Squares/components/BidToggle.js.map +1 -1
  69. package/lib/commonjs/Squares/components/SquareCard.js +2 -1
  70. package/lib/commonjs/Squares/components/SquareCard.js.map +1 -1
  71. package/lib/commonjs/Squares/components/SquaresBoard.js +11 -7
  72. package/lib/commonjs/Squares/components/SquaresBoard.js.map +1 -1
  73. package/lib/commonjs/Squares/index.js +10 -10
  74. package/lib/commonjs/Squares/index.js.map +1 -1
  75. package/lib/commonjs/constants/styles.js +9 -9
  76. package/lib/commonjs/constants/styles.js.map +1 -1
  77. package/lib/commonjs/index.js +2 -0
  78. package/lib/commonjs/index.js.map +1 -1
  79. package/lib/module/ApiOverrides/index.js +3 -3
  80. package/lib/module/ApiOverrides/index.js.map +1 -1
  81. package/lib/module/Authenticator/Components/LoginForm.js +4 -1
  82. package/lib/module/Authenticator/Components/LoginForm.js.map +1 -1
  83. package/lib/module/Authenticator/Components/StrategyForm.js +6 -0
  84. package/lib/module/Authenticator/Components/StrategyForm.js.map +1 -1
  85. package/lib/module/Authenticator/api/index.js +4 -5
  86. package/lib/module/Authenticator/api/index.js.map +1 -1
  87. package/lib/module/Competition/components/AthleteMarketCard.js +1 -3
  88. package/lib/module/Competition/components/AthleteMarketCard.js.map +1 -1
  89. package/lib/module/Competition/components/CompetitionPlay.js +1 -1
  90. package/lib/module/Competition/components/CompetitionPlay.js.map +1 -1
  91. package/lib/module/Competition/components/EnterCompetitionPrompt.js +1 -3
  92. package/lib/module/Competition/components/EnterCompetitionPrompt.js.map +1 -1
  93. package/lib/module/Competition/index.js +10 -15
  94. package/lib/module/Competition/index.js.map +1 -1
  95. package/lib/module/Components/Button.js +3 -2
  96. package/lib/module/Components/Button.js.map +1 -1
  97. package/lib/module/Components/Icons.js +640 -942
  98. package/lib/module/Components/Icons.js.map +1 -1
  99. package/lib/module/Components/ImageUploader.js +96 -45
  100. package/lib/module/Components/ImageUploader.js.map +1 -1
  101. package/lib/module/Components/Jerseys.js +112 -124
  102. package/lib/module/Components/Jerseys.js.map +1 -1
  103. package/lib/module/Components/LinearDiagnal.js +1 -1
  104. package/lib/module/Components/LinearDiagnal.js.map +1 -1
  105. package/lib/module/Components/Spring.js +19 -7
  106. package/lib/module/Components/Spring.js.map +1 -1
  107. package/lib/module/Components/Text.js +6 -6
  108. package/lib/module/Components/Text.js.map +1 -1
  109. package/lib/module/Components/TextInput.js +2 -2
  110. package/lib/module/Components/TextInput.js.map +1 -1
  111. package/lib/module/Components/ViewportObserver.js +7 -0
  112. package/lib/module/Components/ViewportObserver.js.map +1 -1
  113. package/lib/module/EventComponents/TeamProfile/index.js +1 -1
  114. package/lib/module/EventComponents/TeamProfile/index.js.map +1 -1
  115. package/lib/module/Font.css +4 -4
  116. package/lib/module/LocationTracker/LocationStatus.js +5 -4
  117. package/lib/module/LocationTracker/LocationStatus.js.map +1 -1
  118. package/lib/module/LocationTracker/api/index.js +222 -96
  119. package/lib/module/LocationTracker/api/index.js.map +1 -1
  120. package/lib/module/LocationTracker/index.js.map +1 -1
  121. package/lib/module/MarketComponents/api/index.js +0 -2
  122. package/lib/module/MarketComponents/api/index.js.map +1 -1
  123. package/lib/module/MarketComponents/components/AthleteMarket/index.js +0 -2
  124. package/lib/module/MarketComponents/components/AthleteMarket/index.js.map +1 -1
  125. package/lib/module/MarketComponents/components/EventMarket/index.js +0 -1
  126. package/lib/module/MarketComponents/components/EventMarket/index.js.map +1 -1
  127. package/lib/module/MarketComponents/components/MatchMarket/index.js +1 -3
  128. package/lib/module/MarketComponents/components/MatchMarket/index.js.map +1 -1
  129. package/lib/module/MarketComponents/components/TeamEventMarket/index.js +5 -4
  130. package/lib/module/MarketComponents/components/TeamEventMarket/index.js.map +1 -1
  131. package/lib/module/MarketComponents/components/TournamentMarket/index.js +11 -7
  132. package/lib/module/MarketComponents/components/TournamentMarket/index.js.map +1 -1
  133. package/lib/module/ProfileManager/Components/PasswordManager.js +8 -7
  134. package/lib/module/ProfileManager/Components/PasswordManager.js.map +1 -1
  135. package/lib/module/ProfileManager/Components/ProfilePicManager.js +4 -1
  136. package/lib/module/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  137. package/lib/module/SocialComponents/AudioPlayer.js +2 -3
  138. package/lib/module/SocialComponents/AudioPlayer.js.map +1 -1
  139. package/lib/module/SocialComponents/PlayerProfile/components/PostsList.js +59 -50
  140. package/lib/module/SocialComponents/PlayerProfile/components/PostsList.js.map +1 -1
  141. package/lib/module/SocialComponents/PlayerProfile/index.js +6 -8
  142. package/lib/module/SocialComponents/PlayerProfile/index.js.map +1 -1
  143. package/lib/module/Squares/components/BidForm.js +1 -7
  144. package/lib/module/Squares/components/BidForm.js.map +1 -1
  145. package/lib/module/Squares/components/BidToggle.js +0 -1
  146. package/lib/module/Squares/components/BidToggle.js.map +1 -1
  147. package/lib/module/Squares/components/SquareCard.js +2 -1
  148. package/lib/module/Squares/components/SquareCard.js.map +1 -1
  149. package/lib/module/Squares/components/SquaresBoard.js +12 -8
  150. package/lib/module/Squares/components/SquaresBoard.js.map +1 -1
  151. package/lib/module/Squares/index.js +11 -11
  152. package/lib/module/Squares/index.js.map +1 -1
  153. package/lib/module/constants/styles.js +9 -9
  154. package/lib/module/constants/styles.js.map +1 -1
  155. package/lib/module/index.js +2 -0
  156. package/lib/module/index.js.map +1 -1
  157. package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
  158. package/lib/typescript/src/Authenticator/Components/LoginForm.d.ts.map +1 -1
  159. package/lib/typescript/src/Authenticator/Components/StrategyForm.d.ts.map +1 -1
  160. package/lib/typescript/src/Authenticator/api/index.d.ts.map +1 -1
  161. package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts +1 -1
  162. package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts.map +1 -1
  163. package/lib/typescript/src/Competition/index.d.ts.map +1 -1
  164. package/lib/typescript/src/Components/Icons.d.ts +1 -2
  165. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  166. package/lib/typescript/src/Components/ImageUploader.d.ts +2 -2
  167. package/lib/typescript/src/Components/ImageUploader.d.ts.map +1 -1
  168. package/lib/typescript/src/Components/Jerseys.d.ts.map +1 -1
  169. package/lib/typescript/src/Components/Spring.d.ts.map +1 -1
  170. package/lib/typescript/src/Components/Text.d.ts.map +1 -1
  171. package/lib/typescript/src/Components/TextInput.d.ts +2 -2
  172. package/lib/typescript/src/Components/TextInput.d.ts.map +1 -1
  173. package/lib/typescript/src/Components/ViewportObserver.d.ts.map +1 -1
  174. package/lib/typescript/src/EventComponents/index.d.ts.map +1 -1
  175. package/lib/typescript/src/LocationTracker/LocationStatus.d.ts +2 -1
  176. package/lib/typescript/src/LocationTracker/LocationStatus.d.ts.map +1 -1
  177. package/lib/typescript/src/LocationTracker/api/index.d.ts +5 -3
  178. package/lib/typescript/src/LocationTracker/api/index.d.ts.map +1 -1
  179. package/lib/typescript/src/LocationTracker/index.d.ts +2 -1
  180. package/lib/typescript/src/LocationTracker/index.d.ts.map +1 -1
  181. package/lib/typescript/src/MarketComponents/api/index.d.ts.map +1 -1
  182. package/lib/typescript/src/MarketComponents/components/MatchMarket/index.d.ts.map +1 -1
  183. package/lib/typescript/src/MarketComponents/components/TeamEventMarket/index.d.ts.map +1 -1
  184. package/lib/typescript/src/MarketComponents/components/TournamentMarket/index.d.ts.map +1 -1
  185. package/lib/typescript/src/MarketComponents/index.d.ts.map +1 -1
  186. package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
  187. package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
  188. package/lib/typescript/src/SocialComponents/PlayerProfile/components/PostsList.d.ts +1 -1
  189. package/lib/typescript/src/SocialComponents/PlayerProfile/components/PostsList.d.ts.map +1 -1
  190. package/lib/typescript/src/Squares/components/BidForm.d.ts +1 -1
  191. package/lib/typescript/src/Squares/components/BidForm.d.ts.map +1 -1
  192. package/lib/typescript/src/Squares/components/SquaresBoard.d.ts.map +1 -1
  193. package/lib/typescript/src/Squares/index.d.ts.map +1 -1
  194. package/lib/typescript/src/constants/styles.d.ts +1 -1
  195. package/lib/typescript/src/index.d.ts.map +1 -1
  196. package/package.json +23 -7
  197. package/src/ApiOverrides/index.ts +4 -3
  198. package/src/Authenticator/Components/LoginForm.tsx +4 -1
  199. package/src/Authenticator/Components/StrategyForm.tsx +6 -0
  200. package/src/Authenticator/api/index.ts +6 -8
  201. package/src/Competition/components/AthleteMarketCard.tsx +1 -1
  202. package/src/Competition/components/CompetitionPlay.tsx +1 -1
  203. package/src/Competition/components/EnterCompetitionPrompt.tsx +3 -3
  204. package/src/Competition/index.tsx +11 -12
  205. package/src/Components/Button.tsx +20 -20
  206. package/src/Components/Icons.tsx +778 -897
  207. package/src/Components/ImageUploader.tsx +59 -12
  208. package/src/Components/Jerseys.tsx +127 -132
  209. package/src/Components/LinearDiagnal.tsx +1 -1
  210. package/src/Components/Spring.tsx +24 -7
  211. package/src/Components/Text.tsx +6 -9
  212. package/src/Components/TextInput.tsx +3 -3
  213. package/src/Components/ViewportObserver.tsx +4 -0
  214. package/src/EventComponents/TeamProfile/index.tsx +1 -1
  215. package/src/Font.css +4 -4
  216. package/src/LocationTracker/LocationStatus.tsx +6 -6
  217. package/src/LocationTracker/api/index.tsx +172 -59
  218. package/src/LocationTracker/index.tsx +2 -1
  219. package/src/MarketComponents/api/index.ts +0 -2
  220. package/src/MarketComponents/components/AthleteMarket/index.tsx +2 -2
  221. package/src/MarketComponents/components/EventMarket/index.tsx +1 -1
  222. package/src/MarketComponents/components/MatchMarket/index.tsx +3 -4
  223. package/src/MarketComponents/components/TeamEventMarket/index.tsx +16 -12
  224. package/src/MarketComponents/components/TournamentMarket/index.tsx +12 -11
  225. package/src/ProfileManager/Components/PasswordManager.tsx +6 -7
  226. package/src/ProfileManager/Components/ProfilePicManager.tsx +4 -1
  227. package/src/SocialComponents/AudioPlayer.tsx +4 -4
  228. package/src/SocialComponents/PlayerProfile/components/PostsList.tsx +14 -7
  229. package/src/SocialComponents/PlayerProfile/index.tsx +4 -4
  230. package/src/Squares/components/BidForm.tsx +4 -5
  231. package/src/Squares/components/BidToggle.tsx +1 -1
  232. package/src/Squares/components/SquareCard.tsx +2 -2
  233. package/src/Squares/components/SquaresBoard.tsx +22 -20
  234. package/src/Squares/index.tsx +10 -7
  235. package/src/constants/styles.ts +9 -9
  236. package/src/index.tsx +2 -0
@@ -1,23 +1,27 @@
1
1
  // Set your cloud name and unsigned upload preset here:
2
2
  const YOUR_CLOUD_NAME = "hoabts6mc";
3
3
  const YOUR_UNSIGNED_UPLOAD_PRESET = "be_auth_svc";
4
- import React, { useRef } from "react";
4
+
5
+
6
+ import React from "react";
5
7
  import { TouchableOpacity } from "react-native";
8
+ import * as ImagePicker from 'expo-image-picker';
9
+ import axios from 'axios';
6
10
 
7
11
 
8
12
  type CldUploaderProps = {
9
- onFinishUpload : (obj:any) => void
13
+ onFinishUpload : (obj:any | undefined) => void
10
14
  onStartUpload?: () => void,
11
15
  onCancelUpload?: () => void,
12
16
  children?:any,
13
17
  public_id: string
14
18
  }
15
- const ImageUploader = ({ onStartUpload, onCancelUpload, onFinishUpload, public_id, children }:CldUploaderProps) => {
16
- const upload_ref:any = useRef()
17
-
18
- const processFile = async (e:any) => {
19
+ const ImageUploader = ({ onStartUpload, onFinishUpload, public_id, children }:CldUploaderProps) => {
20
+
21
+ /*
22
+ const processFile = async (file:any) => {
19
23
  if(onStartUpload){ onStartUpload() }
20
- var file = e.target.files[0];
24
+ //var file = e.target.files[0];
21
25
  if(!file && onCancelUpload){ onCancelUpload()}
22
26
  var POST_URL =
23
27
  "https://api.cloudinary.com/v1_1/" + YOUR_CLOUD_NAME + "/auto/upload";
@@ -87,19 +91,62 @@ const ImageUploader = ({ onStartUpload, onCancelUpload, onFinishUpload, public_i
87
91
 
88
92
  function noop() {}
89
93
  };
90
-
91
- const handleClick = () => {
92
- if(!upload_ref?.current) { return console.log('no ref') }
93
- upload_ref.current.click()
94
+ */
95
+
96
+ const upload = async(file:any) => {
97
+ const formData = new FormData();
98
+ formData.append('file', file); // 'imageFile' is your selected image file
99
+ formData.append("cloud_name", YOUR_CLOUD_NAME);
100
+ formData.append("upload_preset", YOUR_UNSIGNED_UPLOAD_PRESET);
101
+ formData.append("public_id", public_id);
102
+ const uploadUrl = `https://api.cloudinary.com/v1_1/${YOUR_CLOUD_NAME}/image/upload`;
103
+ var XUniqueUploadId = +new Date();
104
+ try {
105
+ const response = await axios.post(uploadUrl, formData, {
106
+ headers: {
107
+ 'Content-Type': 'multipart/form-data',
108
+ "X-Unique-Upload-Id": XUniqueUploadId,
109
+ 'Authorization': undefined,
110
+ 'x-api-key':undefined,
111
+ 'sessionid':undefined,
112
+ 'distinctid':undefined
113
+ }
114
+ })
115
+ return response.data
116
+ } catch (error) {
117
+ return onFinishUpload(undefined)
118
+ }
94
119
  }
95
120
 
121
+ const handleClick = async() => {
122
+ if(onStartUpload){onStartUpload()}
123
+ let result = await ImagePicker.launchImageLibraryAsync({
124
+ mediaTypes: ['images', 'videos'],
125
+ allowsEditing: true,
126
+ base64:true,
127
+ //aspect: [4, 3],
128
+ quality: 1,
129
+ });
130
+ if(!result?.assets){ return onFinishUpload(undefined)}
131
+ let file = result.assets[0]
132
+ if(!file){ return onFinishUpload(undefined) }
133
+ let mimeType = file.mimeType
134
+ let base_64 = file.base64
135
+ if(!mimeType || !base_64){ return onFinishUpload(undefined) }
136
+ let url = `data:${mimeType};base64,${base_64}`
137
+ let object = await upload(url);
138
+ return onFinishUpload(object)
139
+ }
96
140
  return (
97
141
  <TouchableOpacity style={{ padding:10 }} onPress={() => handleClick()}>
98
- <input ref={upload_ref as any} style={{ display:'none' }} type="file" onChange={processFile} onAbort={() => onCancelUpload ? onCancelUpload() : console.log('cancelled')}/>
99
142
  {children}
100
143
  </TouchableOpacity>
101
144
  );
102
145
 
103
146
  }
104
147
 
148
+ /*
149
+ <input ref={upload_ref as any} style={{ display:'none' }} type="file" onChange={processFile} onAbort={() => onCancelUpload ? onCancelUpload() : console.log('cancelled')}/>
150
+ */
151
+
105
152
  export default ImageUploader;