be-components 5.1.8 → 5.2.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 (219) hide show
  1. package/lib/commonjs/Components/Icons.js +28 -1
  2. package/lib/commonjs/Components/Icons.js.map +1 -1
  3. package/lib/commonjs/Components/Themed.js +13 -1
  4. package/lib/commonjs/Components/Themed.js.map +1 -1
  5. package/lib/commonjs/SocialComponents/FormattedTextInput/components/TagSelector.js +80 -21
  6. package/lib/commonjs/SocialComponents/FormattedTextInput/components/TagSelector.js.map +1 -1
  7. package/lib/commonjs/SocialComponents/FormattedTextInput/index.js +49 -11
  8. package/lib/commonjs/SocialComponents/FormattedTextInput/index.js.map +1 -1
  9. package/lib/commonjs/SocialComponents/GifSelector/NativeSelector.js +14 -0
  10. package/lib/commonjs/SocialComponents/GifSelector/NativeSelector.js.map +1 -0
  11. package/lib/commonjs/SocialComponents/GifSelector/WebSelector.js +123 -0
  12. package/lib/commonjs/SocialComponents/GifSelector/WebSelector.js.map +1 -0
  13. package/lib/commonjs/SocialComponents/GroupChat/components/GroupMessageCard.js +112 -0
  14. package/lib/commonjs/SocialComponents/GroupChat/components/GroupMessageCard.js.map +1 -0
  15. package/lib/commonjs/SocialComponents/GroupChat/index.js +501 -0
  16. package/lib/commonjs/SocialComponents/GroupChat/index.js.map +1 -0
  17. package/lib/commonjs/SocialComponents/ImageRenderer.js +55 -0
  18. package/lib/commonjs/SocialComponents/ImageRenderer.js.map +1 -0
  19. package/lib/commonjs/SocialComponents/InputBar/components/ActionSelector.js +219 -0
  20. package/lib/commonjs/SocialComponents/InputBar/components/ActionSelector.js.map +1 -0
  21. package/lib/commonjs/SocialComponents/InputBar/index.js +59 -5
  22. package/lib/commonjs/SocialComponents/InputBar/index.js.map +1 -1
  23. package/lib/commonjs/SocialComponents/PostCard/components/ArticleCard.js +2 -0
  24. package/lib/commonjs/SocialComponents/PostCard/components/ArticleCard.js.map +1 -0
  25. package/lib/commonjs/SocialComponents/PostCard/components/ImageList.js +37 -25
  26. package/lib/commonjs/SocialComponents/PostCard/components/ImageList.js.map +1 -1
  27. package/lib/commonjs/SocialComponents/PostCard/index.js +148 -70
  28. package/lib/commonjs/SocialComponents/PostCard/index.js.map +1 -1
  29. package/lib/commonjs/SocialComponents/Poster/index.js +325 -0
  30. package/lib/commonjs/SocialComponents/Poster/index.js.map +1 -0
  31. package/lib/commonjs/SocialComponents/SocialOrderCard.js +16 -6
  32. package/lib/commonjs/SocialComponents/SocialOrderCard.js.map +1 -1
  33. package/lib/commonjs/SocialComponents/SocialOrdersList.js +20 -2
  34. package/lib/commonjs/SocialComponents/SocialOrdersList.js.map +1 -1
  35. package/lib/commonjs/SocialComponents/UrlPreviewCard.js +115 -0
  36. package/lib/commonjs/SocialComponents/UrlPreviewCard.js.map +1 -0
  37. package/lib/commonjs/SocialComponents/api/index.js +437 -0
  38. package/lib/commonjs/SocialComponents/api/index.js.map +1 -1
  39. package/lib/commonjs/SocialComponents/index.js +14 -0
  40. package/lib/commonjs/SocialComponents/index.js.map +1 -1
  41. package/lib/module/Components/Icons.js +28 -1
  42. package/lib/module/Components/Icons.js.map +1 -1
  43. package/lib/module/Components/Themed.js +13 -1
  44. package/lib/module/Components/Themed.js.map +1 -1
  45. package/lib/module/SocialComponents/FormattedTextInput/components/TagSelector.js +79 -21
  46. package/lib/module/SocialComponents/FormattedTextInput/components/TagSelector.js.map +1 -1
  47. package/lib/module/SocialComponents/FormattedTextInput/index.js +49 -11
  48. package/lib/module/SocialComponents/FormattedTextInput/index.js.map +1 -1
  49. package/lib/module/SocialComponents/GifSelector/NativeSelector.js +7 -0
  50. package/lib/module/SocialComponents/GifSelector/NativeSelector.js.map +1 -0
  51. package/lib/module/SocialComponents/GifSelector/WebSelector.js +125 -0
  52. package/lib/module/SocialComponents/GifSelector/WebSelector.js.map +1 -0
  53. package/lib/module/SocialComponents/GroupChat/components/GroupMessageCard.js +105 -0
  54. package/lib/module/SocialComponents/GroupChat/components/GroupMessageCard.js.map +1 -0
  55. package/lib/module/SocialComponents/GroupChat/index.js +493 -0
  56. package/lib/module/SocialComponents/GroupChat/index.js.map +1 -0
  57. package/lib/module/SocialComponents/ImageRenderer.js +48 -0
  58. package/lib/module/SocialComponents/ImageRenderer.js.map +1 -0
  59. package/lib/module/SocialComponents/InputBar/components/ActionSelector.js +210 -0
  60. package/lib/module/SocialComponents/InputBar/components/ActionSelector.js.map +1 -0
  61. package/lib/module/SocialComponents/InputBar/index.js +58 -6
  62. package/lib/module/SocialComponents/InputBar/index.js.map +1 -1
  63. package/lib/module/SocialComponents/PostCard/components/ArticleCard.js +2 -0
  64. package/lib/module/SocialComponents/PostCard/components/ArticleCard.js.map +1 -0
  65. package/lib/module/SocialComponents/PostCard/components/ImageList.js +37 -25
  66. package/lib/module/SocialComponents/PostCard/components/ImageList.js.map +1 -1
  67. package/lib/module/SocialComponents/PostCard/index.js +148 -70
  68. package/lib/module/SocialComponents/PostCard/index.js.map +1 -1
  69. package/lib/module/SocialComponents/Poster/index.js +316 -0
  70. package/lib/module/SocialComponents/Poster/index.js.map +1 -0
  71. package/lib/module/SocialComponents/SocialOrderCard.js +16 -6
  72. package/lib/module/SocialComponents/SocialOrderCard.js.map +1 -1
  73. package/lib/module/SocialComponents/SocialOrdersList.js +21 -3
  74. package/lib/module/SocialComponents/SocialOrdersList.js.map +1 -1
  75. package/lib/module/SocialComponents/UrlPreviewCard.js +106 -0
  76. package/lib/module/SocialComponents/UrlPreviewCard.js.map +1 -0
  77. package/lib/module/SocialComponents/api/index.js +437 -0
  78. package/lib/module/SocialComponents/api/index.js.map +1 -1
  79. package/lib/module/SocialComponents/index.js +3 -1
  80. package/lib/module/SocialComponents/index.js.map +1 -1
  81. package/lib/typescript/lib/commonjs/Components/Icons.d.ts +5 -0
  82. package/lib/typescript/lib/commonjs/Components/Icons.d.ts.map +1 -1
  83. package/lib/typescript/lib/commonjs/Components/Themed.d.ts.map +1 -1
  84. package/lib/typescript/lib/commonjs/SocialComponents/FormattedTextInput/components/TagSelector.d.ts +3 -1
  85. package/lib/typescript/lib/commonjs/SocialComponents/FormattedTextInput/components/TagSelector.d.ts.map +1 -1
  86. package/lib/typescript/lib/commonjs/SocialComponents/FormattedTextInput/index.d.ts +6 -1
  87. package/lib/typescript/lib/commonjs/SocialComponents/FormattedTextInput/index.d.ts.map +1 -1
  88. package/lib/typescript/lib/commonjs/SocialComponents/GifSelector/NativeSelector.d.ts +4 -0
  89. package/lib/typescript/lib/commonjs/SocialComponents/GifSelector/NativeSelector.d.ts.map +1 -0
  90. package/lib/typescript/lib/commonjs/SocialComponents/GifSelector/WebSelector.d.ts +4 -0
  91. package/lib/typescript/lib/commonjs/SocialComponents/GifSelector/WebSelector.d.ts.map +1 -0
  92. package/lib/typescript/lib/commonjs/SocialComponents/GroupChat/components/GroupMessageCard.d.ts +14 -0
  93. package/lib/typescript/lib/commonjs/SocialComponents/GroupChat/components/GroupMessageCard.d.ts.map +1 -0
  94. package/lib/typescript/lib/commonjs/SocialComponents/GroupChat/index.d.ts +18 -0
  95. package/lib/typescript/lib/commonjs/SocialComponents/GroupChat/index.d.ts.map +1 -0
  96. package/lib/typescript/lib/commonjs/SocialComponents/ImageRenderer.d.ts +11 -0
  97. package/lib/typescript/lib/commonjs/SocialComponents/ImageRenderer.d.ts.map +1 -0
  98. package/lib/typescript/lib/commonjs/SocialComponents/InputBar/components/ActionSelector.d.ts +9 -0
  99. package/lib/typescript/lib/commonjs/SocialComponents/InputBar/components/ActionSelector.d.ts.map +1 -0
  100. package/lib/typescript/lib/commonjs/SocialComponents/InputBar/index.d.ts +3 -1
  101. package/lib/typescript/lib/commonjs/SocialComponents/InputBar/index.d.ts.map +1 -1
  102. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/components/ArticleCard.d.ts +1 -0
  103. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/components/ArticleCard.d.ts.map +1 -0
  104. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/components/ImageList.d.ts +1 -2
  105. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/components/ImageList.d.ts.map +1 -1
  106. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/index.d.ts +4 -1
  107. package/lib/typescript/lib/commonjs/SocialComponents/PostCard/index.d.ts.map +1 -1
  108. package/lib/typescript/lib/commonjs/SocialComponents/Poster/index.d.ts +9 -0
  109. package/lib/typescript/lib/commonjs/SocialComponents/Poster/index.d.ts.map +1 -0
  110. package/lib/typescript/lib/commonjs/SocialComponents/SocialOrderCard.d.ts +3 -1
  111. package/lib/typescript/lib/commonjs/SocialComponents/SocialOrderCard.d.ts.map +1 -1
  112. package/lib/typescript/lib/commonjs/SocialComponents/SocialOrdersList.d.ts +2 -1
  113. package/lib/typescript/lib/commonjs/SocialComponents/SocialOrdersList.d.ts.map +1 -1
  114. package/lib/typescript/lib/commonjs/SocialComponents/UrlPreviewCard.d.ts +9 -0
  115. package/lib/typescript/lib/commonjs/SocialComponents/UrlPreviewCard.d.ts.map +1 -0
  116. package/lib/typescript/lib/commonjs/SocialComponents/api/index.d.ts +94 -0
  117. package/lib/typescript/lib/commonjs/SocialComponents/api/index.d.ts.map +1 -1
  118. package/lib/typescript/lib/commonjs/SocialComponents/index.d.ts +2 -0
  119. package/lib/typescript/lib/module/Components/Icons.d.ts +5 -0
  120. package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
  121. package/lib/typescript/lib/module/Components/Themed.d.ts.map +1 -1
  122. package/lib/typescript/lib/module/SocialComponents/FormattedTextInput/components/TagSelector.d.ts +3 -1
  123. package/lib/typescript/lib/module/SocialComponents/FormattedTextInput/components/TagSelector.d.ts.map +1 -1
  124. package/lib/typescript/lib/module/SocialComponents/FormattedTextInput/index.d.ts +6 -1
  125. package/lib/typescript/lib/module/SocialComponents/FormattedTextInput/index.d.ts.map +1 -1
  126. package/lib/typescript/lib/module/SocialComponents/GifSelector/NativeSelector.d.ts +4 -0
  127. package/lib/typescript/lib/module/SocialComponents/GifSelector/NativeSelector.d.ts.map +1 -0
  128. package/lib/typescript/lib/module/SocialComponents/GifSelector/WebSelector.d.ts +13 -0
  129. package/lib/typescript/lib/module/SocialComponents/GifSelector/WebSelector.d.ts.map +1 -0
  130. package/lib/typescript/lib/module/SocialComponents/GroupChat/components/GroupMessageCard.d.ts +14 -0
  131. package/lib/typescript/lib/module/SocialComponents/GroupChat/components/GroupMessageCard.d.ts.map +1 -0
  132. package/lib/typescript/lib/module/SocialComponents/GroupChat/index.d.ts +18 -0
  133. package/lib/typescript/lib/module/SocialComponents/GroupChat/index.d.ts.map +1 -0
  134. package/lib/typescript/lib/module/SocialComponents/ImageRenderer.d.ts +11 -0
  135. package/lib/typescript/lib/module/SocialComponents/ImageRenderer.d.ts.map +1 -0
  136. package/lib/typescript/lib/module/SocialComponents/InputBar/components/ActionSelector.d.ts +10 -0
  137. package/lib/typescript/lib/module/SocialComponents/InputBar/components/ActionSelector.d.ts.map +1 -0
  138. package/lib/typescript/lib/module/SocialComponents/InputBar/index.d.ts +3 -1
  139. package/lib/typescript/lib/module/SocialComponents/InputBar/index.d.ts.map +1 -1
  140. package/lib/typescript/lib/module/SocialComponents/PostCard/components/ArticleCard.d.ts +1 -0
  141. package/lib/typescript/lib/module/SocialComponents/PostCard/components/ArticleCard.d.ts.map +1 -0
  142. package/lib/typescript/lib/module/SocialComponents/PostCard/components/ImageList.d.ts +1 -2
  143. package/lib/typescript/lib/module/SocialComponents/PostCard/components/ImageList.d.ts.map +1 -1
  144. package/lib/typescript/lib/module/SocialComponents/PostCard/index.d.ts +4 -1
  145. package/lib/typescript/lib/module/SocialComponents/PostCard/index.d.ts.map +1 -1
  146. package/lib/typescript/lib/module/SocialComponents/Poster/index.d.ts +11 -0
  147. package/lib/typescript/lib/module/SocialComponents/Poster/index.d.ts.map +1 -0
  148. package/lib/typescript/lib/module/SocialComponents/SocialOrderCard.d.ts +4 -2
  149. package/lib/typescript/lib/module/SocialComponents/SocialOrderCard.d.ts.map +1 -1
  150. package/lib/typescript/lib/module/SocialComponents/SocialOrdersList.d.ts +2 -1
  151. package/lib/typescript/lib/module/SocialComponents/SocialOrdersList.d.ts.map +1 -1
  152. package/lib/typescript/lib/module/SocialComponents/UrlPreviewCard.d.ts +9 -0
  153. package/lib/typescript/lib/module/SocialComponents/UrlPreviewCard.d.ts.map +1 -0
  154. package/lib/typescript/lib/module/SocialComponents/api/index.d.ts +94 -0
  155. package/lib/typescript/lib/module/SocialComponents/api/index.d.ts.map +1 -1
  156. package/lib/typescript/lib/module/SocialComponents/index.d.ts +3 -1
  157. package/lib/typescript/lib/module/SocialComponents/index.d.ts.map +1 -1
  158. package/lib/typescript/src/Components/Icons.d.ts +1 -0
  159. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  160. package/lib/typescript/src/Components/Themed.d.ts +1 -0
  161. package/lib/typescript/src/Components/Themed.d.ts.map +1 -1
  162. package/lib/typescript/src/SocialComponents/FormattedTextInput/components/TagSelector.d.ts +8 -1
  163. package/lib/typescript/src/SocialComponents/FormattedTextInput/components/TagSelector.d.ts.map +1 -1
  164. package/lib/typescript/src/SocialComponents/FormattedTextInput/index.d.ts +6 -1
  165. package/lib/typescript/src/SocialComponents/FormattedTextInput/index.d.ts.map +1 -1
  166. package/lib/typescript/src/SocialComponents/GifSelector/NativeSelector.d.ts +4 -0
  167. package/lib/typescript/src/SocialComponents/GifSelector/NativeSelector.d.ts.map +1 -0
  168. package/lib/typescript/src/SocialComponents/GifSelector/WebSelector.d.ts +11 -0
  169. package/lib/typescript/src/SocialComponents/GifSelector/WebSelector.d.ts.map +1 -0
  170. package/lib/typescript/src/SocialComponents/GroupChat/components/GroupMessageCard.d.ts +21 -0
  171. package/lib/typescript/src/SocialComponents/GroupChat/components/GroupMessageCard.d.ts.map +1 -0
  172. package/lib/typescript/src/SocialComponents/GroupChat/index.d.ts +34 -0
  173. package/lib/typescript/src/SocialComponents/GroupChat/index.d.ts.map +1 -0
  174. package/lib/typescript/src/SocialComponents/ImageRenderer.d.ts +21 -0
  175. package/lib/typescript/src/SocialComponents/ImageRenderer.d.ts.map +1 -0
  176. package/lib/typescript/src/SocialComponents/InputBar/components/ActionSelector.d.ts +16 -0
  177. package/lib/typescript/src/SocialComponents/InputBar/components/ActionSelector.d.ts.map +1 -0
  178. package/lib/typescript/src/SocialComponents/InputBar/index.d.ts +10 -1
  179. package/lib/typescript/src/SocialComponents/InputBar/index.d.ts.map +1 -1
  180. package/lib/typescript/src/SocialComponents/PostCard/components/ArticleCard.d.ts +1 -0
  181. package/lib/typescript/src/SocialComponents/PostCard/components/ArticleCard.d.ts.map +1 -0
  182. package/lib/typescript/src/SocialComponents/PostCard/components/ImageList.d.ts +1 -1
  183. package/lib/typescript/src/SocialComponents/PostCard/components/ImageList.d.ts.map +1 -1
  184. package/lib/typescript/src/SocialComponents/PostCard/index.d.ts +4 -2
  185. package/lib/typescript/src/SocialComponents/PostCard/index.d.ts.map +1 -1
  186. package/lib/typescript/src/SocialComponents/Poster/index.d.ts +16 -0
  187. package/lib/typescript/src/SocialComponents/Poster/index.d.ts.map +1 -0
  188. package/lib/typescript/src/SocialComponents/SocialOrderCard.d.ts +3 -1
  189. package/lib/typescript/src/SocialComponents/SocialOrderCard.d.ts.map +1 -1
  190. package/lib/typescript/src/SocialComponents/SocialOrdersList.d.ts +2 -1
  191. package/lib/typescript/src/SocialComponents/SocialOrdersList.d.ts.map +1 -1
  192. package/lib/typescript/src/SocialComponents/UrlPreviewCard.d.ts +10 -0
  193. package/lib/typescript/src/SocialComponents/UrlPreviewCard.d.ts.map +1 -0
  194. package/lib/typescript/src/SocialComponents/api/index.d.ts +42 -1
  195. package/lib/typescript/src/SocialComponents/api/index.d.ts.map +1 -1
  196. package/lib/typescript/src/SocialComponents/index.d.ts +3 -1
  197. package/lib/typescript/src/SocialComponents/index.d.ts.map +1 -1
  198. package/package.json +5 -1
  199. package/src/Components/Icons.tsx +18 -1
  200. package/src/Components/Themed.tsx +11 -1
  201. package/src/SocialComponents/FormattedTextInput/components/TagSelector.tsx +56 -15
  202. package/src/SocialComponents/FormattedTextInput/index.tsx +36 -9
  203. package/src/SocialComponents/GifSelector/NativeSelector.tsx +13 -0
  204. package/src/SocialComponents/GifSelector/WebSelector.tsx +91 -0
  205. package/src/SocialComponents/GroupChat/components/GroupMessageCard.tsx +105 -0
  206. package/src/SocialComponents/GroupChat/index.tsx +403 -0
  207. package/src/SocialComponents/ImageRenderer.tsx +42 -0
  208. package/src/SocialComponents/InputBar/components/ActionSelector.tsx +165 -0
  209. package/src/SocialComponents/InputBar/index.tsx +40 -6
  210. package/src/SocialComponents/PostCard/components/ArticleCard.tsx +2 -0
  211. package/src/SocialComponents/PostCard/components/ImageList.tsx +28 -21
  212. package/src/SocialComponents/PostCard/index.tsx +122 -56
  213. package/src/SocialComponents/Poster/index.tsx +264 -0
  214. package/src/SocialComponents/SocialOrderCard.tsx +9 -8
  215. package/src/SocialComponents/SocialOrdersList.tsx +14 -8
  216. package/src/SocialComponents/UrlPreviewCard.tsx +75 -0
  217. package/src/SocialComponents/api/index.ts +385 -3
  218. package/src/SocialComponents/index.tsx +4 -0
  219. package/src/types.d.ts +58 -0
@@ -0,0 +1,210 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { ActivityIndicator, FlatList, Modal } from "react-native";
3
+ import { Button, Text, View } from '../../../Components/Themed';
4
+ import { SocialComponentApi, SocialOrderHelpers } from '../../api';
5
+ import { useColors } from '../../../constants/useColors';
6
+ import SocialOrderCard from '../../SocialOrderCard';
7
+ const sections = ['toggle', 'orders'];
8
+ const ActionSelector = ({
9
+ visible,
10
+ insets,
11
+ onClose,
12
+ onTagOrder
13
+ }) => {
14
+ const Colors = useColors();
15
+ const [tagged_action, setTaggedAction] = useState({
16
+ tagged_orders: []
17
+ });
18
+ const {
19
+ tagged_orders
20
+ } = tagged_action;
21
+ const [action_state, setActionState] = useState({
22
+ loading: false,
23
+ orders: [],
24
+ events: [],
25
+ tournaments: [],
26
+ leagues: [],
27
+ teams: [],
28
+ matches: [],
29
+ athletes: []
30
+ });
31
+ const {
32
+ loading,
33
+ orders,
34
+ events,
35
+ athletes,
36
+ leagues,
37
+ tournaments,
38
+ matches,
39
+ teams
40
+ } = action_state;
41
+ useEffect(() => {
42
+ if (!visible) {
43
+ return setTaggedAction({
44
+ ...tagged_action,
45
+ tagged_orders: []
46
+ });
47
+ }
48
+ getMyAction();
49
+ }, [visible]);
50
+ const getMyAction = async () => {
51
+ setActionState({
52
+ ...action_state,
53
+ loading: true
54
+ });
55
+ const ords = await SocialComponentApi.getMyAction();
56
+ const {
57
+ event_ids,
58
+ tournament_ids,
59
+ match_ids,
60
+ athlete_ids,
61
+ team_ids
62
+ } = SocialOrderHelpers.getIdsFromOrders(ords);
63
+ let l = await SocialComponentApi.getLeagues();
64
+ let e = await SocialComponentApi.getEventsByEventIds(event_ids);
65
+ let t = await SocialComponentApi.getTournamentsByTournamentIds(tournament_ids);
66
+ let m = await SocialComponentApi.getMatchesByMatchIds(match_ids);
67
+ let a = await SocialComponentApi.getAthletesByIds(athlete_ids);
68
+ let tm = await SocialComponentApi.getTeamsByIds(team_ids);
69
+ setActionState({
70
+ ...action_state,
71
+ loading: false,
72
+ leagues: l,
73
+ teams: tm,
74
+ orders: ords,
75
+ matches: m,
76
+ tournaments: t,
77
+ events: e,
78
+ athletes: a
79
+ });
80
+ };
81
+ const renderOrders = data => {
82
+ const {
83
+ time,
84
+ title,
85
+ league
86
+ } = SocialOrderHelpers.getContestDetails(data.item, events, tournaments, matches, athletes, teams, leagues);
87
+ const tagged = tagged_orders.includes(data.item.order_id) ? true : false;
88
+ return /*#__PURE__*/React.createElement(View, {
89
+ transparent: true,
90
+ style: {
91
+ margin: 5,
92
+ borderWidth: tagged ? 2 : 0,
93
+ borderColor: Colors.text.success
94
+ }
95
+ }, /*#__PURE__*/React.createElement(SocialOrderCard, {
96
+ order: data.item,
97
+ league: league,
98
+ onTagOrder: order => {
99
+ if (tagged) {
100
+ setTaggedAction({
101
+ ...tagged_action,
102
+ tagged_orders: tagged_orders.filter(o => o != order.order_id)
103
+ });
104
+ } else {
105
+ setTaggedAction({
106
+ ...tagged_action,
107
+ tagged_orders: tagged_orders.filter(o => o != order.order_id).concat(order.order_id)
108
+ });
109
+ }
110
+ onTagOrder(order);
111
+ },
112
+ contest_time: time,
113
+ contest_title: title
114
+ }));
115
+ };
116
+ const renderSections = data => {
117
+ switch (data.item) {
118
+ case 'toggle':
119
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
120
+ case 'orders':
121
+ return /*#__PURE__*/React.createElement(View, {
122
+ transparent: true,
123
+ style: {
124
+ padding: 10
125
+ }
126
+ }, /*#__PURE__*/React.createElement(FlatList, {
127
+ key: `action_orders`,
128
+ keyExtractor: item => item.order_id.toString(),
129
+ renderItem: renderOrders,
130
+ data: orders
131
+ }));
132
+ default:
133
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
134
+ }
135
+ };
136
+ return /*#__PURE__*/React.createElement(Modal, {
137
+ visible: visible,
138
+ style: {
139
+ flex: 1
140
+ },
141
+ animationType: "slide",
142
+ transparent: true
143
+ }, /*#__PURE__*/React.createElement(View, {
144
+ type: "blur",
145
+ style: {
146
+ flex: 1,
147
+ paddingTop: insets?.top,
148
+ paddingBottom: insets?.bottom
149
+ }
150
+ }, /*#__PURE__*/React.createElement(View, {
151
+ float: true,
152
+ style: {
153
+ flex: 1,
154
+ margin: 20
155
+ }
156
+ }, /*#__PURE__*/React.createElement(View, {
157
+ type: "header",
158
+ style: {
159
+ flexDirection: 'row',
160
+ alignItems: 'center',
161
+ padding: 10,
162
+ borderTopRightRadius: 8,
163
+ borderTopLeftRadius: 8
164
+ }
165
+ }, /*#__PURE__*/React.createElement(View, {
166
+ transparent: true,
167
+ style: {
168
+ flex: 1
169
+ }
170
+ }, /*#__PURE__*/React.createElement(Text, {
171
+ theme: "h1"
172
+ }, "Your Current Action"), /*#__PURE__*/React.createElement(Text, {
173
+ style: {
174
+ marginTop: 3
175
+ },
176
+ theme: "description"
177
+ }, "Select the order or other action you would like to tag!")), /*#__PURE__*/React.createElement(Button, {
178
+ style: {
179
+ height: 30,
180
+ width: 30,
181
+ borderRadius: 100,
182
+ justifyContent: 'center',
183
+ alignItems: 'center',
184
+ padding: 0
185
+ },
186
+ title: "X",
187
+ float: true,
188
+ type: "close",
189
+ onPress: () => onClose()
190
+ })), loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
191
+ style: {
192
+ padding: 20,
193
+ alignSelf: 'center'
194
+ },
195
+ size: "large",
196
+ color: Colors.text.h1
197
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
198
+ transparent: true,
199
+ style: {
200
+ flex: 1
201
+ }
202
+ }, /*#__PURE__*/React.createElement(FlatList, {
203
+ data: sections,
204
+ key: 'action_selector_sections',
205
+ keyExtractor: item => item,
206
+ renderItem: renderSections
207
+ })))));
208
+ };
209
+ export default ActionSelector;
210
+ //# sourceMappingURL=ActionSelector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useState","ActivityIndicator","FlatList","Modal","Button","Text","View","SocialComponentApi","SocialOrderHelpers","useColors","SocialOrderCard","sections","ActionSelector","visible","insets","onClose","onTagOrder","Colors","tagged_action","setTaggedAction","tagged_orders","action_state","setActionState","loading","orders","events","tournaments","leagues","teams","matches","athletes","getMyAction","ords","event_ids","tournament_ids","match_ids","athlete_ids","team_ids","getIdsFromOrders","l","getLeagues","e","getEventsByEventIds","t","getTournamentsByTournamentIds","m","getMatchesByMatchIds","a","getAthletesByIds","tm","getTeamsByIds","renderOrders","data","time","title","league","getContestDetails","item","tagged","includes","order_id","createElement","transparent","style","margin","borderWidth","borderColor","text","success","order","filter","o","concat","contest_time","contest_title","renderSections","Fragment","padding","key","keyExtractor","toString","renderItem","flex","animationType","type","paddingTop","top","paddingBottom","bottom","float","flexDirection","alignItems","borderTopRightRadius","borderTopLeftRadius","theme","marginTop","height","width","borderRadius","justifyContent","onPress","alignSelf","size","color","h1"],"source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,GAAG,EAAE,0BAA2B;IAChCC,YAAY,EAAEtB,IAAI,IAAIA,IAAK;IAC3BwB,UAAU,EAAEN;EAAe,CAC9B,CACC,CACJ,CACJ,CACH,CAAC;AAEhB,CAAC;AAED,eAAe/D,cAAc","ignoreList":[]}
@@ -1,19 +1,34 @@
1
- import React from 'react';
2
- import { View } from "../../Components/Themed";
1
+ import React, { useState } from 'react';
2
+ import { Button, View } from "../../Components/Themed";
3
3
  import { FlatList } from 'react-native';
4
4
  import { Icons } from '../../Components';
5
5
  import { useColors } from '../../constants/useColors';
6
6
  import ImageUploader from '../../Components/ImageUploader';
7
+ import ActionSelector from './components/ActionSelector';
7
8
  const InputBar = ({
8
9
  actions,
9
- onImageUpload
10
+ insets,
11
+ onImageUpload,
12
+ onTagOrder
10
13
  }) => {
14
+ //const [ gif_select, setGifSelect ] = useState(false);
15
+
16
+ const [input_state, setInputState] = useState({
17
+ action_selector_visible: false
18
+ });
19
+ const {
20
+ action_selector_visible
21
+ } = input_state;
11
22
  const Colors = useColors();
12
23
  const renderActions = data => {
13
24
  switch (data.item) {
14
25
  case 'image':
15
26
  return /*#__PURE__*/React.createElement(View, {
16
- float: true
27
+ style: {
28
+ margin: 4,
29
+ justifyContent: 'center',
30
+ alignItems: 'center'
31
+ }
17
32
  }, /*#__PURE__*/React.createElement(ImageUploader, {
18
33
  public_id: (Math.random() * 100000).toFixed(),
19
34
  onFinishUpload: obj => onImageUpload({
@@ -21,9 +36,38 @@ const InputBar = ({
21
36
  url: obj.secure_url
22
37
  })
23
38
  }, /*#__PURE__*/React.createElement(Icons.ImageIcon, {
24
- size: 20,
25
- color: Colors.text.h1
39
+ size: 16,
40
+ color: Colors.text.action
26
41
  })));
42
+ case 'action':
43
+ return /*#__PURE__*/React.createElement(Button, {
44
+ style: {
45
+ justifyContent: 'center',
46
+ alignItems: 'center',
47
+ margin: 4,
48
+ padding: 10
49
+ },
50
+ onPress: () => setInputState({
51
+ ...input_state,
52
+ action_selector_visible: true
53
+ })
54
+ }, /*#__PURE__*/React.createElement(Icons.ActivityIcon, {
55
+ size: 18,
56
+ color: Colors.text.action
57
+ }));
58
+ case 'gif':
59
+ return /*#__PURE__*/React.createElement(Button, {
60
+ style: {
61
+ justifyContent: 'center',
62
+ alignItems: 'center',
63
+ margin: 4,
64
+ padding: 10
65
+ },
66
+ onPress: () => console.log('')
67
+ }, /*#__PURE__*/React.createElement(Icons.GIFIcon, {
68
+ size: 18,
69
+ color: Colors.text.action
70
+ }));
27
71
  default:
28
72
  return /*#__PURE__*/React.createElement(React.Fragment, null);
29
73
  }
@@ -41,6 +85,14 @@ const InputBar = ({
41
85
  horizontal: true,
42
86
  keyExtractor: item => item,
43
87
  renderItem: renderActions
88
+ }), /*#__PURE__*/React.createElement(ActionSelector, {
89
+ visible: action_selector_visible,
90
+ insets: insets,
91
+ onTagOrder: order => onTagOrder ? onTagOrder(order) : console.log(''),
92
+ onClose: () => setInputState({
93
+ ...input_state,
94
+ action_selector_visible: false
95
+ })
44
96
  }));
45
97
  };
46
98
  export default InputBar;
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","FlatList","Icons","useColors","ImageUploader","InputBar","actions","onImageUpload","Colors","renderActions","data","item","createElement","float","public_id","Math","random","toFixed","onFinishUpload","obj","url","secure_url","ImageIcon","size","color","text","h1","Fragment","transparent","style","flexDirection","alignItems","padding","key","horizontal","keyExtractor","renderItem"],"sourceRoot":"../../../../src","sources":["SocialComponents/InputBar/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,yBAAyB;AAC9C,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,KAAK,QAAQ,kBAAkB;AACxC,SAASC,SAAS,QAAQ,2BAA2B;AACrD,OAAOC,aAAa,MAAM,gCAAgC;AAO1D,MAAMC,QAAQ,GAAGA,CAAC;EAAEC,OAAO;EAAEC;AAA8B,CAAC,KAAK;EAC7D,MAAMC,MAAM,GAAGL,SAAS,CAAC,CAAC;EAE1B,MAAMM,aAAa,GAAIC,IAAkC,IAAK;IAC1D,QAAOA,IAAI,CAACC,IAAI;MACZ,KAAK,OAAO;QACR,oBACIZ,KAAA,CAAAa,aAAA,CAACZ,IAAI;UAACa,KAAK;QAAA,gBACPd,KAAA,CAAAa,aAAA,CAACR,aAAa;UACVU,SAAS,EAAE,CAACC,IAAI,CAACC,MAAM,CAAC,CAAC,GAAC,MAAM,EAAEC,OAAO,CAAC,CAAE;UAC5CC,cAAc,EAAGC,GAAG,IAAKZ,aAAa,CAAC;YAAE,GAAGY,GAAG;YAAEC,GAAG,EAAED,GAAG,CAACE;UAAW,CAAC;QAAE,gBAExEtB,KAAA,CAAAa,aAAA,CAACV,KAAK,CAACoB,SAAS;UAACC,IAAI,EAAE,EAAG;UAACC,KAAK,EAAEhB,MAAM,CAACiB,IAAI,CAACC;QAAG,CAAE,CACxC,CACb,CAAC;MAEf;QAAS,oBAAO3B,KAAA,CAAAa,aAAA,CAAAb,KAAA,CAAA4B,QAAA,MAAI,CAAC;IACzB;EACJ,CAAC;EAED,oBACI5B,KAAA,CAAAa,aAAA,CAACZ,IAAI;IAAC4B,WAAW;IAACC,KAAK,EAAE;MAAEC,aAAa,EAAC,KAAK;MAAEC,UAAU,EAAC,QAAQ;MAAEC,OAAO,EAAC;IAAE;EAAE,gBAC7EjC,KAAA,CAAAa,aAAA,CAACX,QAAQ;IACLgC,GAAG,EAAE,aAAc;IACnBvB,IAAI,EAAEJ,OAAQ;IACd4B,UAAU;IACVC,YAAY,EAAGxB,IAAI,IAAKA,IAAK;IAC7ByB,UAAU,EAAE3B;EAAc,CAC7B,CACC,CAAC;AAEf,CAAC;AAED,eAAeJ,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["React","useState","Button","View","FlatList","Icons","useColors","ImageUploader","ActionSelector","InputBar","actions","insets","onImageUpload","onTagOrder","input_state","setInputState","action_selector_visible","Colors","renderActions","data","item","createElement","style","margin","justifyContent","alignItems","public_id","Math","random","toFixed","onFinishUpload","obj","url","secure_url","ImageIcon","size","color","text","action","padding","onPress","ActivityIcon","console","log","GIFIcon","Fragment","transparent","flexDirection","key","horizontal","keyExtractor","renderItem","visible","order","onClose"],"sourceRoot":"../../../../src","sources":["SocialComponents/InputBar/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,MAAM,EAAEC,IAAI,QAAQ,yBAAyB;AACtD,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,KAAK,QAAQ,kBAAkB;AACxC,SAASC,SAAS,QAAQ,2BAA2B;AACrD,OAAOC,aAAa,MAAM,gCAAgC;AAC1D,OAAOC,cAAc,MAAM,6BAA6B;AAWxD,MAAMC,QAAQ,GAAGA,CAAC;EAAEC,OAAO;EAAEC,MAAM;EAAEC,aAAa;EAAEC;AAA2B,CAAC,KAAK;EACjF;;EAEA,MAAM,CAAEC,WAAW,EAAEC,aAAa,CAAE,GAAGd,QAAQ,CAE5C;IACCe,uBAAuB,EAAE;EAC7B,CAAC,CAAC;EACF,MAAM;IAAEA;EAAwB,CAAC,GAAGF,WAAW;EAE/C,MAAMG,MAAM,GAAGX,SAAS,CAAC,CAAC;EAE1B,MAAMY,aAAa,GAAIC,IAAkC,IAAK;IAC1D,QAAOA,IAAI,CAACC,IAAI;MACZ,KAAK,OAAO;QACR,oBACIpB,KAAA,CAAAqB,aAAA,CAAClB,IAAI;UAACmB,KAAK,EAAE;YAAEC,MAAM,EAAC,CAAC;YAAEC,cAAc,EAAC,QAAQ;YAAEC,UAAU,EAAC;UAAS;QAAE,gBACpEzB,KAAA,CAAAqB,aAAA,CAACd,aAAa;UACVmB,SAAS,EAAE,CAACC,IAAI,CAACC,MAAM,CAAC,CAAC,GAAC,MAAM,EAAEC,OAAO,CAAC,CAAE;UAC5CC,cAAc,EAAGC,GAAG,IAAKnB,aAAa,CAAC;YAAE,GAAGmB,GAAG;YAAEC,GAAG,EAAED,GAAG,CAACE;UAAW,CAAC;QAA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AAEtB,UAAU,EAAC,QAAQ;MAAEc,OAAO,EAAC;IAAE;EAAE,gBAC7EvC,KAAA,CAAAqB,aAAA,CAACjB,QAAQ;IACL4C,GAAG,EAAE,aAAc;IACnB7B,IAAI,EAAET,OAAQ;IACduC,UAAU;IACVC,YAAY,EAAG9B,IAAI,IAAKA,IAAK;IAC7B+B,UAAU,EAAEjC;EAAc,CAC7B,CAAC,eACFlB,KAAA,CAAAqB,aAAA,CAACb,cAAc;IACX4C,OAAO,EAAEpC,uBAAwB;IACjCL,MAAM,EAAEA,MAAO;IACfE,UAAU,EAAGwC,KAAK,IAAKxC,UAAU,GAAGA,UAAU,CAACwC,KAAK,CAAC,GAAGX,OAAO,CAACC,GAAG,CAAC,EAAE,CAAE;IACxEW,OAAO,EAAEA,CAAA,KAAMvC,aAAa,CAAC;MAAE,GAAGD,WAAW;MAAEE,uBAAuB,EAAE;IAAM,CAAC;EAAE,CACpF,CACC,CAAC;AAEf,CAAC;AAED,eAAeP,QAAQ","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=ArticleCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["SocialComponents/PostCard/components/ArticleCard.tsx"],"mappings":"","ignoreList":[]}
@@ -1,43 +1,55 @@
1
1
  import React from 'react';
2
2
  import { FlatList, View, Image } from 'react-native';
3
+ import { Button } from '../../../Components/Themed';
4
+ import { SocialComponentHelpers } from '../../api';
3
5
  const ImageList = ({
4
- post_id,
5
6
  width,
6
7
  images
7
8
  }) => {
8
- const resizeImage = image => {
9
- let image_width = image.width ?? width;
10
- let image_height = image.height ?? width;
11
- const ratio = image_height / image_width;
12
- let new_width = width;
13
- let new_height = width * ratio;
14
- return {
15
- width: new_width,
16
- height: new_height
17
- };
18
- };
9
+ const new_images = SocialComponentHelpers.organizeImages(images, width - 2, 250, 2, 150);
19
10
  const renderImages = data => {
20
- const {
21
- width,
22
- height
23
- } = resizeImage(data.item);
24
- return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Image, {
11
+ return /*#__PURE__*/React.createElement(Button, {
12
+ float: true,
13
+ style: {
14
+ padding: 0,
15
+ paddingLeft: data.item.paddingLeft,
16
+ paddingRight: data.item.paddingRight
17
+ }
18
+ }, /*#__PURE__*/React.createElement(Image, {
25
19
  source: {
26
20
  uri: data.item.url
27
21
  },
28
22
  style: {
29
- width,
30
- height
23
+ height: data.item.scaledHeight,
24
+ width: data.item.scaledWidth,
25
+ borderRadius: 8
31
26
  },
32
27
  resizeMode: "cover"
33
28
  }));
34
29
  };
35
- return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(FlatList, {
36
- key: `${post_id}_post_images`,
37
- data: images,
38
- horizontal: true,
39
- renderItem: renderImages,
40
- keyExtractor: item => item.url
30
+ const renderImageRows = data => {
31
+ return /*#__PURE__*/React.createElement(View, {
32
+ style: {
33
+ alignItems: 'center',
34
+ marginBottom: 2
35
+ }
36
+ }, /*#__PURE__*/React.createElement(FlatList, {
37
+ data: data.item,
38
+ renderItem: renderImages,
39
+ scrollEnabled: false,
40
+ horizontal: true
41
+ }));
42
+ };
43
+ return /*#__PURE__*/React.createElement(View, {
44
+ style: {
45
+ flexDirection: 'row',
46
+ justifyContent: 'center',
47
+ flexWrap: 'wrap'
48
+ }
49
+ }, /*#__PURE__*/React.createElement(FlatList, {
50
+ data: new_images,
51
+ keyExtractor: (item, index) => `${item.length}_${index}`,
52
+ renderItem: renderImageRows
41
53
  }));
42
54
  };
43
55
  export default ImageList;
@@ -1 +1 @@
1
- {"version":3,"names":["React","FlatList","View","Image","ImageList","post_id","width","images","resizeImage","image","image_width","image_height","height","ratio","new_width","new_height","renderImages","data","item","createElement","source","uri","url","style","resizeMode","key","horizontal","renderItem","keyExtractor"],"sourceRoot":"../../../../../src","sources":["SocialComponents/PostCard/components/ImageList.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,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SocialComponentHelpers","ImageList","width","images","new_images","organizeImages","renderImages","data","createElement","float","style","padding","paddingLeft","item","paddingRight","source","uri","url","height","scaledHeight","scaledWidth","borderRadius","resizeMode","renderImageRows","alignItems","marginBottom","renderItem","scrollEnabled","horizontal","flexDirection","justifyContent","flexWrap","keyExtractor","index","length"],"sourceRoot":"../../../../../src","sources":["SocialComponents/PostCard/components/ImageList.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AACpD,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,sBAAsB,QAAQ,WAAW;AAOlD,MAAMC,SAAS,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAsB,CAAC,KAAK;EAEpD,MAAMC,UAAU,GAAGJ,sBAAsB,CAACK,cAAc,CAACF,MAAM,EAAED,KAAK,GAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC;EAGtF,MAAMI,YAAY,GAAIC,IAA+B,IAAK;IACtD,oBACIZ,KAAA,CAAAa,aAAA,CAACT,MAAM;MAACU,KAAK;MAACC,KAAK,EAAE;QAAEC,OAAO,EAAC,CAAC;QAAEC,WAAW,EAACL,IAAI,CAACM,IAAI,CAACD,WAAW;QAAEE,YAAY,EAACP,IAAI,CAACM,IAAI,CAACC;MAAa;IAAE,gBACvGnB,KAAA,CAAAa,aAAA,CAACV,KAAK;MACFiB,MAAM,EAAE;QAAEC,GAAG,EAAET,IAAI,CAACM,IAAI,CAACI;MAAI,CAAE;MAC/BP,KAAK,EAAE;QAAEQ,MAAM,EAAEX,IAAI,CAACM,IAAI,CAACM,YAAY;QAAEjB,KAAK,EAAEK,IAAI,CAACM,IAAI,CAACO,WAAW;QAAEC,YAAY,EAAC;MAAE,CAAE;MACxFC,UAAU,EAAC;IAAO,CACrB,CACG,CAAC;EAEjB,CAAC;EAED,MAAMC,eAAe,GAAIhB,IAAgC,IAAK;IAC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