be-components 4.3.3 → 4.3.4

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 (47) hide show
  1. package/lib/commonjs/Components/Slider.js +2 -0
  2. package/lib/commonjs/Components/Slider.js.map +1 -1
  3. package/lib/commonjs/SocialComponents/AudioPlayer.js +116 -185
  4. package/lib/commonjs/SocialComponents/AudioPlayer.js.map +1 -1
  5. package/lib/commonjs/SocialComponents/PodcastEpisodeCard.js +40 -35
  6. package/lib/commonjs/SocialComponents/PodcastEpisodeCard.js.map +1 -1
  7. package/lib/commonjs/SocialComponents/PodcastModule/components/ClaimPodcastModal.js +51 -49
  8. package/lib/commonjs/SocialComponents/PodcastModule/components/ClaimPodcastModal.js.map +1 -1
  9. package/lib/commonjs/SocialComponents/PodcastModule/index.js +337 -335
  10. package/lib/commonjs/SocialComponents/PodcastModule/index.js.map +1 -1
  11. package/lib/module/Components/Slider.js +2 -0
  12. package/lib/module/Components/Slider.js.map +1 -1
  13. package/lib/module/SocialComponents/AudioPlayer.js +111 -180
  14. package/lib/module/SocialComponents/AudioPlayer.js.map +1 -1
  15. package/lib/module/SocialComponents/PodcastEpisodeCard.js +31 -26
  16. package/lib/module/SocialComponents/PodcastEpisodeCard.js.map +1 -1
  17. package/lib/module/SocialComponents/PodcastModule/components/ClaimPodcastModal.js +31 -28
  18. package/lib/module/SocialComponents/PodcastModule/components/ClaimPodcastModal.js.map +1 -1
  19. package/lib/module/SocialComponents/PodcastModule/index.js +336 -334
  20. package/lib/module/SocialComponents/PodcastModule/index.js.map +1 -1
  21. package/lib/typescript/lib/commonjs/Components/Slider.d.ts.map +1 -1
  22. package/lib/typescript/lib/commonjs/SocialComponents/AudioPlayer.d.ts +3 -1
  23. package/lib/typescript/lib/commonjs/SocialComponents/AudioPlayer.d.ts.map +1 -1
  24. package/lib/typescript/lib/commonjs/SocialComponents/PodcastEpisodeCard.d.ts.map +1 -1
  25. package/lib/typescript/lib/commonjs/SocialComponents/PodcastModule/components/ClaimPodcastModal.d.ts.map +1 -1
  26. package/lib/typescript/lib/commonjs/SocialComponents/PodcastModule/index.d.ts.map +1 -1
  27. package/lib/typescript/lib/module/Components/Slider.d.ts.map +1 -1
  28. package/lib/typescript/lib/module/SocialComponents/AudioPlayer.d.ts +4 -5
  29. package/lib/typescript/lib/module/SocialComponents/AudioPlayer.d.ts.map +1 -1
  30. package/lib/typescript/lib/module/SocialComponents/PodcastEpisodeCard.d.ts +1 -2
  31. package/lib/typescript/lib/module/SocialComponents/PodcastEpisodeCard.d.ts.map +1 -1
  32. package/lib/typescript/lib/module/SocialComponents/PodcastModule/components/ClaimPodcastModal.d.ts +1 -2
  33. package/lib/typescript/lib/module/SocialComponents/PodcastModule/components/ClaimPodcastModal.d.ts.map +1 -1
  34. package/lib/typescript/lib/module/SocialComponents/PodcastModule/index.d.ts +1 -2
  35. package/lib/typescript/lib/module/SocialComponents/PodcastModule/index.d.ts.map +1 -1
  36. package/lib/typescript/src/Components/Slider.d.ts.map +1 -1
  37. package/lib/typescript/src/SocialComponents/AudioPlayer.d.ts +8 -1
  38. package/lib/typescript/src/SocialComponents/AudioPlayer.d.ts.map +1 -1
  39. package/lib/typescript/src/SocialComponents/PodcastEpisodeCard.d.ts.map +1 -1
  40. package/lib/typescript/src/SocialComponents/PodcastModule/components/ClaimPodcastModal.d.ts.map +1 -1
  41. package/lib/typescript/src/SocialComponents/PodcastModule/index.d.ts.map +1 -1
  42. package/package.json +2 -2
  43. package/src/Components/Slider.tsx +2 -0
  44. package/src/SocialComponents/AudioPlayer.tsx +86 -172
  45. package/src/SocialComponents/PodcastEpisodeCard.tsx +23 -23
  46. package/src/SocialComponents/PodcastModule/components/ClaimPodcastModal.tsx +18 -24
  47. package/src/SocialComponents/PodcastModule/index.tsx +132 -130
@@ -1,14 +1,16 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { View, ActivityIndicator, Image, ScrollView, TouchableOpacity, FlatList } from "react-native";
2
+ import { ActivityIndicator, Image, FlatList } from "react-native";
3
3
  import { PodcastApi } from './api';
4
- import Colors from '../../constants/colors';
5
4
  import { SocialPodcastHelpers } from '../api';
6
- import { view_styles } from '../../constants/styles';
7
- import { Button, Icons, Spring, Text } from '../../Components';
5
+ import { Icons } from '../../Components';
8
6
  import PodcastEpisodeCard from '../PodcastEpisodeCard';
9
7
  import moment from 'moment-mini';
10
8
  import PlayerCard from '../PlayerCard';
11
9
  import ClaimPodcastModal from './components/ClaimPodcastModal';
10
+ import { Button, Text, View } from '../../Components/Themed';
11
+ import { useColors } from '../../constants/useColors';
12
+ import Pagination from '../../Components/Pagination';
13
+ const sections = ['header', 'players', 'episodes'];
12
14
  const PodcastModule = ({
13
15
  podcast_id,
14
16
  player_id,
@@ -19,6 +21,7 @@ const PodcastModule = ({
19
21
  onSharePodcast,
20
22
  onSelectPlayer
21
23
  }) => {
24
+ const Colors = useColors();
22
25
  const [module_size, setModuleSize] = useState({
23
26
  height: 700,
24
27
  width: 330
@@ -101,6 +104,7 @@ const PodcastModule = ({
101
104
  };
102
105
  const renderPlayers = data => {
103
106
  return /*#__PURE__*/React.createElement(View, {
107
+ float: true,
104
108
  style: {
105
109
  padding: 4
106
110
  }
@@ -116,7 +120,12 @@ const PodcastModule = ({
116
120
  const renderEpsidoes = data => {
117
121
  const ep_width = (module_size.width - 60) / 2;
118
122
  const ppe = player_podcast_episodes.find(pp => pp.podcast_episode_id == data.item.podcast_episode_id);
119
- return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(PodcastEpisodeCard, {
123
+ return /*#__PURE__*/React.createElement(View, {
124
+ float: true,
125
+ style: {
126
+ margin: 7
127
+ }
128
+ }, /*#__PURE__*/React.createElement(PodcastEpisodeCard, {
120
129
  podcast_episode: data.item,
121
130
  player_podcast_episode: ppe,
122
131
  width: ep_width,
@@ -124,34 +133,318 @@ const PodcastModule = ({
124
133
  onSelectEpisode: onSelectEpisode
125
134
  }));
126
135
  };
127
- if (!podcast || loading) {
128
- return /*#__PURE__*/React.createElement(View, {
129
- style: {
130
- flex: 1
131
- }
132
- }, /*#__PURE__*/React.createElement(ActivityIndicator, {
133
- style: {
134
- padding: 20,
135
- alignSelf: 'center'
136
- },
137
- size: "large",
138
- color: Colors.brand.midnight
139
- }));
140
- }
141
136
  let height = module_size.height * 0.5;
142
137
  let width = module_size.width;
143
- let description = `${podcast.description.slice(0, 200)}...`;
144
- if (podcast.description_override) {
145
- description = `${podcast.description.slice(0, 200)}...`;
146
- }
138
+ const renderSections = data => {
139
+ switch (data.item) {
140
+ case 'header':
141
+ if (!podcast) {
142
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
143
+ }
144
+ let description = `${podcast.description.slice(0, 200)}...`;
145
+ if (podcast.description_override) {
146
+ description = `${podcast.description.slice(0, 200)}...`;
147
+ }
148
+ return /*#__PURE__*/React.createElement(View, {
149
+ nativeID: "podcast_header"
150
+ }, /*#__PURE__*/React.createElement(Image, {
151
+ source: {
152
+ uri: SocialPodcastHelpers.getPodcastImage(podcast)
153
+ },
154
+ style: {
155
+ width,
156
+ height
157
+ },
158
+ resizeMode: "cover"
159
+ }), /*#__PURE__*/React.createElement(View, {
160
+ type: "blur",
161
+ style: {
162
+ padding: 20,
163
+ position: 'absolute',
164
+ bottom: 0,
165
+ left: 0,
166
+ right: 0
167
+ }
168
+ }, /*#__PURE__*/React.createElement(Button, {
169
+ type: "success",
170
+ onPress: () => {
171
+ let episode = podcast_episodes.sort((a, b) => moment(b.publish_date).unix() - moment(a.publish_date).unix())[0];
172
+ if (!episode) {
173
+ return alert('Unable to process');
174
+ }
175
+ onSelectEpisode(episode);
176
+ },
177
+ disabled: podcast_episodes.length == 0 ? true : false,
178
+ style: {
179
+ padding: 10,
180
+ borderRadius: 8,
181
+ width: module_size.width * 0.7,
182
+ flexDirection: 'row',
183
+ alignItems: 'center',
184
+ justifyContent: 'center',
185
+ alignSelf: 'center'
186
+ }
187
+ }, /*#__PURE__*/React.createElement(Icons.PlayIcon, {
188
+ size: 20,
189
+ color: Colors.text.action
190
+ }), /*#__PURE__*/React.createElement(Text, {
191
+ style: {
192
+ marginLeft: 15
193
+ },
194
+ weight: "bold",
195
+ color: Colors.text.h1
196
+ }, "Play Episode")), podcast.claim_status ? /*#__PURE__*/React.createElement(Button, {
197
+ type: "success",
198
+ style: {
199
+ padding: 10,
200
+ marginTop: 5,
201
+ borderRadius: 8,
202
+ width: module_size.width * 0.7,
203
+ flexDirection: 'row',
204
+ alignItems: 'center',
205
+ justifyContent: 'center',
206
+ alignSelf: 'center'
207
+ },
208
+ onPress: () => setShowClaim(true)
209
+ }, /*#__PURE__*/React.createElement(Icons.HeadphoneIcon, {
210
+ size: 20,
211
+ color: Colors.text.h1
212
+ }), /*#__PURE__*/React.createElement(Text, {
213
+ style: {
214
+ marginLeft: 15
215
+ },
216
+ weight: "bold",
217
+ color: Colors.text.h1
218
+ }, "Claim This Podcast!")) : podcast.claim_status == 'requested' && player?.role != 'admin' ? /*#__PURE__*/React.createElement(View, {
219
+ style: {
220
+ padding: 10,
221
+ marginTop: 5,
222
+ borderRadius: 8,
223
+ width: module_size.width * 0.7,
224
+ flexDirection: 'row',
225
+ alignItems: 'center',
226
+ justifyContent: 'center',
227
+ alignSelf: 'center'
228
+ }
229
+ }, /*#__PURE__*/React.createElement(Icons.HeadphoneIcon, {
230
+ size: 20,
231
+ color: Colors.text.h1
232
+ }), /*#__PURE__*/React.createElement(Text, {
233
+ style: {
234
+ marginLeft: 15
235
+ },
236
+ weight: "bold",
237
+ color: Colors.text.h1
238
+ }, "Claim Requested!")) : podcast.claim_status == 'requested' && player?.role == 'admin' ? /*#__PURE__*/React.createElement(Button, {
239
+ type: "success",
240
+ style: {
241
+ padding: 10,
242
+ marginTop: 5,
243
+ borderRadius: 8,
244
+ width: module_size.width * 0.7,
245
+ flexDirection: 'row',
246
+ alignItems: 'center',
247
+ justifyContent: 'center',
248
+ alignSelf: 'center'
249
+ },
250
+ onPress: () => approveClaim()
251
+ }, /*#__PURE__*/React.createElement(Icons.HeadphoneIcon, {
252
+ size: 20,
253
+ color: Colors.text.h1
254
+ }), /*#__PURE__*/React.createElement(Text, {
255
+ style: {
256
+ marginLeft: 15
257
+ },
258
+ weight: "bold",
259
+ color: Colors.text.h1
260
+ }, "Approve Claim Request!")) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
261
+ transparent: true,
262
+ style: {
263
+ marginTop: 10
264
+ }
265
+ }, /*#__PURE__*/React.createElement(Text, {
266
+ size: 24,
267
+ weight: "bold",
268
+ color: Colors.text.h1
269
+ }, podcast.title), /*#__PURE__*/React.createElement(Text, {
270
+ style: {
271
+ marginTop: 4
272
+ },
273
+ color: Colors.text.h1,
274
+ weight: "semibold"
275
+ }, description)), podcast.claim_status == 'claimed' ? /*#__PURE__*/React.createElement(View, {
276
+ transparent: true,
277
+ style: {
278
+ position: 'absolute',
279
+ top: 20,
280
+ left: 5,
281
+ height: 40,
282
+ width: 40,
283
+ borderRadius: 100,
284
+ justifyContent: 'center',
285
+ alignItems: 'center'
286
+ }
287
+ }, /*#__PURE__*/React.createElement(Icons.CheckCirlceIcon, {
288
+ size: 30,
289
+ color: Colors.text.success
290
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null), podcast.claim_status == 'claimed' && claimed_player ? /*#__PURE__*/React.createElement(Button, {
291
+ transparent: true,
292
+ float: true,
293
+ style: {
294
+ position: 'absolute',
295
+ padding: 0,
296
+ top: 20,
297
+ right: 5,
298
+ borderRadius: 100,
299
+ justifyContent: 'center',
300
+ alignItems: 'center'
301
+ },
302
+ onPress: () => onSelectPlayer ? onSelectPlayer(claimed_player) : console.log('')
303
+ }, /*#__PURE__*/React.createElement(Image, {
304
+ source: {
305
+ uri: claimed_player.profile_pic && claimed_player.profile_pic != '' ? claimed_player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp'
306
+ },
307
+ style: {
308
+ height: 40,
309
+ width: 40,
310
+ borderRadius: 100
311
+ },
312
+ resizeMode: "cover"
313
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null)), /*#__PURE__*/React.createElement(View, {
314
+ transparent: true,
315
+ style: {
316
+ position: 'absolute',
317
+ top: padding_insets?.top ?? 0,
318
+ left: 0,
319
+ right: 0,
320
+ flexDirection: 'row',
321
+ alignItems: 'center',
322
+ padding: 10
323
+ }
324
+ }, onBack ? /*#__PURE__*/React.createElement(Button, {
325
+ float: true,
326
+ style: {
327
+ height: 50,
328
+ width: 50,
329
+ borderRadius: 100,
330
+ justifyContent: 'center',
331
+ alignItems: 'center'
332
+ },
333
+ onPress: () => onBack()
334
+ }, /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
335
+ direction: "left",
336
+ color: Colors.text.action,
337
+ size: 14
338
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
339
+ style: {
340
+ flex: 1
341
+ }
342
+ }), onSharePodcast ? /*#__PURE__*/React.createElement(Button, {
343
+ float: true,
344
+ style: {
345
+ height: 50,
346
+ width: 50,
347
+ borderRadius: 100,
348
+ justifyContent: 'center',
349
+ alignItems: 'center'
350
+ },
351
+ onPress: () => onSharePodcast(podcast)
352
+ }, /*#__PURE__*/React.createElement(Icons.ShareIcon, {
353
+ color: Colors.text.action,
354
+ size: 14
355
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null)));
356
+ case 'players':
357
+ if (players.length == 0) {
358
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
359
+ }
360
+ return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
361
+ type: "header",
362
+ style: {
363
+ flexDirection: 'row',
364
+ alignItems: 'center',
365
+ padding: 10
366
+ }
367
+ }, /*#__PURE__*/React.createElement(View, {
368
+ transparent: true,
369
+ style: {
370
+ flex: 1
371
+ }
372
+ }, /*#__PURE__*/React.createElement(Text, {
373
+ theme: "h1"
374
+ }, "Podcasters"), /*#__PURE__*/React.createElement(Text, {
375
+ style: {
376
+ marginTop: 3
377
+ },
378
+ theme: "description"
379
+ }, "Below are the players that put this podcast on! Check out their profiles"))), /*#__PURE__*/React.createElement(View, {
380
+ style: {
381
+ padding: 10
382
+ }
383
+ }, /*#__PURE__*/React.createElement(FlatList, {
384
+ key: "podcastors",
385
+ data: players,
386
+ horizontal: true,
387
+ showsHorizontalScrollIndicator: false,
388
+ renderItem: renderPlayers,
389
+ keyExtractor: item => item.player_id.toString()
390
+ })));
391
+ case 'episodes':
392
+ return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
393
+ type: "header",
394
+ style: {
395
+ flexDirection: 'row',
396
+ alignItems: 'center',
397
+ padding: 10
398
+ }
399
+ }, /*#__PURE__*/React.createElement(View, {
400
+ transparent: true,
401
+ style: {
402
+ flex: 1
403
+ }
404
+ }, /*#__PURE__*/React.createElement(Text, {
405
+ theme: "h1"
406
+ }, "Episodes"), /*#__PURE__*/React.createElement(Text, {
407
+ style: {
408
+ marginTop: 3
409
+ },
410
+ theme: "description"
411
+ }, "Select an episode below to listed to it!"))), /*#__PURE__*/React.createElement(View, {
412
+ transparent: true
413
+ }, /*#__PURE__*/React.createElement(Pagination, {
414
+ offset: episodes_offset,
415
+ onNext: () => getEpisdoesFromServer(podcast_id, episodes_offset + 1),
416
+ onPrevious: () => getEpisdoesFromServer(podcast_id, episodes_offset - 1)
417
+ }), episodes_loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
418
+ style: {
419
+ padding: 20,
420
+ alignSelf: 'center'
421
+ },
422
+ size: "large",
423
+ color: Colors.text.h1
424
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
425
+ transparent: true,
426
+ style: {
427
+ flexDirection: 'row',
428
+ flexWrap: 'wrap',
429
+ justifyContent: 'center'
430
+ }
431
+ }, podcast_episodes.sort((a, b) => moment(b.publish_date).unix() - moment(a.publish_date).unix()).map((e, i) => {
432
+ return renderEpsidoes({
433
+ item: e,
434
+ index: i
435
+ });
436
+ }))));
437
+ default:
438
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
439
+ }
440
+ };
147
441
  return /*#__PURE__*/React.createElement(View, {
148
442
  style: {
149
443
  flex: 1
150
444
  }
151
445
  }, /*#__PURE__*/React.createElement(View, {
152
446
  style: {
153
- flex: 1,
154
- backgroundColor: Colors.shades.white
447
+ flex: 1
155
448
  },
156
449
  onLayout: ev => {
157
450
  const {
@@ -163,321 +456,36 @@ const PodcastModule = ({
163
456
  height
164
457
  });
165
458
  }
166
- }, /*#__PURE__*/React.createElement(ScrollView, {
167
- style: {
168
- flex: 1
169
- }
170
- }, /*#__PURE__*/React.createElement(View, {
171
- nativeID: "podcast_header"
172
- }, /*#__PURE__*/React.createElement(Image, {
173
- source: {
174
- uri: SocialPodcastHelpers.getPodcastImage(podcast)
175
- },
176
- style: {
177
- width,
178
- height
179
- },
180
- resizeMode: "cover"
181
- }), /*#__PURE__*/React.createElement(View, {
182
- style: {
183
- padding: 20,
184
- position: 'absolute',
185
- bottom: 0,
186
- left: 0,
187
- right: 0,
188
- ...style.blur
189
- }
190
- }, /*#__PURE__*/React.createElement(TouchableOpacity, {
191
- onPress: () => {
192
- let episode = podcast_episodes.sort((a, b) => moment(b.publish_date).unix() - moment(a.publish_date).unix())[0];
193
- if (!episode) {
194
- return alert('Unable to process');
195
- }
196
- onSelectEpisode(episode);
197
- },
198
- disabled: podcast_episodes.length == 0 ? true : false,
199
- style: {
200
- padding: 10,
201
- borderRadius: 8,
202
- width: module_size.width * 0.7,
203
- flexDirection: 'row',
204
- alignItems: 'center',
205
- justifyContent: 'center',
206
- alignSelf: 'center',
207
- backgroundColor: Colors.shades.white,
208
- ...view_styles.float
209
- }
210
- }, /*#__PURE__*/React.createElement(Icons.PlayIcon, {
211
- size: 20,
212
- color: Colors.brand.electric
213
- }), /*#__PURE__*/React.createElement(Text, {
214
- style: {
215
- marginLeft: 15
216
- },
217
- weight: "bold",
218
- color: Colors.brand.electric
219
- }, "Play Episode")), !podcast.claim_status ? /*#__PURE__*/React.createElement(TouchableOpacity, {
220
- style: {
221
- padding: 10,
222
- marginTop: 5,
223
- borderRadius: 8,
224
- width: module_size.width * 0.7,
225
- flexDirection: 'row',
226
- alignItems: 'center',
227
- justifyContent: 'center',
228
- alignSelf: 'center',
229
- backgroundColor: Colors.utility.success,
230
- ...view_styles.float
231
- },
232
- onPress: () => setShowClaim(true)
233
- }, /*#__PURE__*/React.createElement(Icons.HeadphoneIcon, {
234
- size: 20,
235
- color: Colors.shades.white
236
- }), /*#__PURE__*/React.createElement(Text, {
237
- style: {
238
- marginLeft: 15
239
- },
240
- weight: "bold",
241
- color: Colors.shades.white
242
- }, "Claim This Podcast!")) : podcast.claim_status == 'requested' && player?.role != 'admin' ? /*#__PURE__*/React.createElement(View, {
243
- style: {
244
- padding: 10,
245
- marginTop: 5,
246
- borderRadius: 8,
247
- width: module_size.width * 0.7,
248
- flexDirection: 'row',
249
- alignItems: 'center',
250
- justifyContent: 'center',
251
- alignSelf: 'center',
252
- backgroundColor: Colors.brand.midnight,
253
- ...view_styles.float
254
- }
255
- }, /*#__PURE__*/React.createElement(Icons.HeadphoneIcon, {
256
- size: 20,
257
- color: Colors.shades.white
258
- }), /*#__PURE__*/React.createElement(Text, {
259
- style: {
260
- marginLeft: 15
261
- },
262
- weight: "bold",
263
- color: Colors.shades.white
264
- }, "Claim Requested!")) : podcast.claim_status == 'requested' && player?.role == 'admin' ? /*#__PURE__*/React.createElement(TouchableOpacity, {
265
- style: {
266
- padding: 10,
267
- marginTop: 5,
268
- borderRadius: 8,
269
- width: module_size.width * 0.7,
270
- flexDirection: 'row',
271
- alignItems: 'center',
272
- justifyContent: 'center',
273
- alignSelf: 'center',
274
- backgroundColor: Colors.utility.success,
275
- ...view_styles.float
276
- },
277
- onPress: () => approveClaim()
278
- }, /*#__PURE__*/React.createElement(Icons.HeadphoneIcon, {
279
- size: 20,
280
- color: Colors.shades.white
281
- }), /*#__PURE__*/React.createElement(Text, {
282
- style: {
283
- marginLeft: 15
284
- },
285
- weight: "bold",
286
- color: Colors.shades.white
287
- }, "Approve Claim Request!")) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
288
- style: {
289
- marginTop: 10
290
- }
291
- }, /*#__PURE__*/React.createElement(Text, {
292
- size: 24,
293
- weight: "bold",
294
- color: Colors.shades.white
295
- }, podcast.title), /*#__PURE__*/React.createElement(Text, {
296
- style: {
297
- marginTop: 4
298
- },
299
- color: Colors.shades.white,
300
- weight: "semibold"
301
- }, description)), podcast.claim_status == 'claimed' ? /*#__PURE__*/React.createElement(View, {
302
- style: {
303
- position: 'absolute',
304
- top: 20,
305
- left: 5,
306
- height: 40,
307
- width: 40,
308
- borderRadius: 100,
309
- justifyContent: 'center',
310
- alignItems: 'center'
311
- }
312
- }, /*#__PURE__*/React.createElement(Icons.CheckCirlceIcon, {
313
- size: 30,
314
- color: Colors.utility.success
315
- })) : /*#__PURE__*/React.createElement(React.Fragment, null), podcast.claim_status == 'claimed' && claimed_player ? /*#__PURE__*/React.createElement(TouchableOpacity, {
316
- style: {
317
- position: 'absolute',
318
- top: 20,
319
- right: 5,
320
- justifyContent: 'center',
321
- alignItems: 'center'
322
- },
323
- onPress: () => onSelectPlayer ? onSelectPlayer(claimed_player) : console.log('')
324
- }, /*#__PURE__*/React.createElement(Image, {
325
- source: {
326
- uri: claimed_player.profile_pic && claimed_player.profile_pic != '' ? claimed_player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1722453927/default_man_n96ofq.webp'
327
- },
328
- style: {
329
- height: 40,
330
- width: 40,
331
- borderRadius: 100
332
- },
333
- resizeMode: "cover"
334
- })) : /*#__PURE__*/React.createElement(React.Fragment, null))), players.length > 0 ? /*#__PURE__*/React.createElement(View, {
335
- style: {
336
- ...view_styles.section
337
- }
338
- }, /*#__PURE__*/React.createElement(View, {
339
- style: {
340
- ...view_styles.section_header
341
- }
342
- }, /*#__PURE__*/React.createElement(View, {
343
- style: {
344
- flex: 1
345
- }
346
- }, /*#__PURE__*/React.createElement(Text, {
347
- theme: "header"
348
- }, "Podcasters"), /*#__PURE__*/React.createElement(Text, {
349
- style: {
350
- marginTop: 3
351
- },
352
- theme: "body_2"
353
- }, "Below are the players that put this podcast on! Check out their profiles"))), /*#__PURE__*/React.createElement(View, {
354
- style: {
355
- ...view_styles.section_body,
356
- padding: 10
357
- }
358
- }, /*#__PURE__*/React.createElement(FlatList, {
359
- key: "podcastors",
360
- data: players,
361
- horizontal: true,
362
- showsHorizontalScrollIndicator: false,
363
- renderItem: renderPlayers,
364
- keyExtractor: item => item.player_id.toString()
365
- }))) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
366
- style: {
367
- ...view_styles.section
368
- }
369
- }, /*#__PURE__*/React.createElement(View, {
370
- style: {
371
- ...view_styles.section_header
372
- }
373
- }, /*#__PURE__*/React.createElement(View, {
374
- style: {
375
- flex: 1
376
- }
377
- }, /*#__PURE__*/React.createElement(Text, {
378
- theme: "header"
379
- }, "Episodes"), /*#__PURE__*/React.createElement(Text, {
380
- style: {
381
- marginTop: 3
382
- },
383
- theme: "body_2"
384
- }, "Select an episode below to listed to it!"))), /*#__PURE__*/React.createElement(View, {
385
- style: {
386
- ...view_styles.section_body,
387
- padding: 0
388
- }
389
- }, /*#__PURE__*/React.createElement(View, {
390
- style: {
391
- ...view_styles.body_row
392
- }
393
- }, episodes_offset > 0 ? /*#__PURE__*/React.createElement(Button, {
394
- title: "PREV",
395
- title_color: Colors.brand.electric,
396
- backgroundColor: "transparent",
397
- onPress: () => getEpisdoesFromServer(podcast_id, episodes_offset - 1)
398
- }) : /*#__PURE__*/React.createElement(View, null), /*#__PURE__*/React.createElement(View, {
399
- style: {
400
- flex: 1
401
- }
402
- }), /*#__PURE__*/React.createElement(Button, {
403
- title: "NEXT",
404
- title_color: Colors.brand.electric,
405
- backgroundColor: "transparent",
406
- onPress: () => getEpisdoesFromServer(podcast_id, episodes_offset + 1)
407
- })), episodes_loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
459
+ }, loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
408
460
  style: {
409
461
  padding: 20,
410
462
  alignSelf: 'center'
411
463
  },
412
464
  size: "large",
413
- color: Colors.brand.midnight
414
- }) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
415
- style: {
416
- flexDirection: 'row',
417
- flexWrap: 'wrap'
418
- }
419
- }, podcast_episodes.sort((a, b) => moment(b.publish_date).unix() - moment(a.publish_date).unix()).map((e, i) => {
420
- return renderEpsidoes({
421
- item: e,
422
- index: i
423
- });
424
- }))))), /*#__PURE__*/React.createElement(View, {
465
+ color: Colors.text.h1
466
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(FlatList, {
467
+ data: sections,
468
+ refreshing: pod_data.loading,
469
+ onRefresh: () => getPodDataFromServer(podcast_id, 0),
470
+ key: 'podcast_sections',
471
+ keyExtractor: item => item,
472
+ renderItem: renderSections
473
+ })), show_claim && podcast ? /*#__PURE__*/React.createElement(View, {
474
+ type: "blur",
425
475
  style: {
426
476
  position: 'absolute',
427
- top: padding_insets?.top ?? 0,
428
- left: 0,
477
+ top: 0,
429
478
  right: 0,
430
- flexDirection: 'row',
431
- alignItems: 'center'
432
- }
433
- }, onBack ? /*#__PURE__*/React.createElement(TouchableOpacity, {
434
- style: {
435
- ...view_styles.section,
436
- backgroundColor: Colors.shades.shade100,
437
- height: 50,
438
- width: 50,
439
- borderRadius: 100,
479
+ left: 0,
480
+ bottom: 0,
440
481
  justifyContent: 'center',
441
- alignItems: 'center'
442
- },
443
- onPress: () => onBack()
444
- }, /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
445
- direction: "left",
446
- color: Colors.brand.midnight,
447
- size: 14
448
- })) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
449
- style: {
450
- flex: 1
482
+ alignItems: 'center',
483
+ padding: 20
451
484
  }
452
- }), onSharePodcast ? /*#__PURE__*/React.createElement(TouchableOpacity, {
453
- style: {
454
- ...view_styles.section,
455
- backgroundColor: Colors.shades.shade100,
456
- height: 50,
457
- width: 50,
458
- borderRadius: 100,
459
- justifyContent: 'center',
460
- alignItems: 'center'
461
- },
462
- onPress: () => onSharePodcast(podcast)
463
- }, /*#__PURE__*/React.createElement(Icons.ShareIcon, {
464
- color: Colors.brand.electric,
465
- size: 14
466
- })) : /*#__PURE__*/React.createElement(React.Fragment, null))), show_claim ? /*#__PURE__*/React.createElement(View, {
485
+ }, /*#__PURE__*/React.createElement(View, {
467
486
  style: {
468
- position: 'absolute',
469
- flex: 1,
470
- backgroundColor: Colors.shades.black_faded,
471
- top: 0,
472
- left: 0,
473
- right: 0,
474
- bottom: 0,
475
- justifyContent: 'flex-end'
487
+ maxWidth: 500
476
488
  }
477
- }, /*#__PURE__*/React.createElement(Spring, {
478
- slide: "vertical",
479
- to: 0,
480
- from: 500
481
489
  }, /*#__PURE__*/React.createElement(ClaimPodcastModal, {
482
490
  podcast: podcast,
483
491
  width: module_size.width - 20,
@@ -492,10 +500,4 @@ const PodcastModule = ({
492
500
  }))) : /*#__PURE__*/React.createElement(React.Fragment, null));
493
501
  };
494
502
  export default PodcastModule;
495
- const style = {
496
- blur: {
497
- backdropFilter: 'blur(75px)',
498
- backgroundColor: Colors.shades.black_faded_heavy
499
- }
500
- };
501
503
  //# sourceMappingURL=index.js.map