be-components 2.6.1 → 2.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/AnalyticComponents/MarketPerformance/index.js +2 -0
- package/lib/commonjs/AnalyticComponents/MarketPerformance/index.js.map +1 -0
- package/lib/commonjs/AnalyticComponents/api/index.js +20 -0
- package/lib/commonjs/AnalyticComponents/api/index.js.map +1 -0
- package/lib/commonjs/AnalyticComponents/index.js +2 -0
- package/lib/commonjs/AnalyticComponents/index.js.map +1 -0
- package/lib/commonjs/SocialComponents/PodcastModule/api/index.js +28 -0
- package/lib/commonjs/SocialComponents/PodcastModule/api/index.js.map +1 -1
- package/lib/commonjs/SocialComponents/PodcastModule/components/ClaimPodcastModal.js +140 -0
- package/lib/commonjs/SocialComponents/PodcastModule/components/ClaimPodcastModal.js.map +1 -0
- package/lib/commonjs/SocialComponents/PodcastModule/index.js +235 -33
- package/lib/commonjs/SocialComponents/PodcastModule/index.js.map +1 -1
- package/lib/module/AnalyticComponents/MarketPerformance/index.js +2 -0
- package/lib/module/AnalyticComponents/MarketPerformance/index.js.map +1 -0
- package/lib/module/AnalyticComponents/api/index.js +15 -0
- package/lib/module/AnalyticComponents/api/index.js.map +1 -0
- package/lib/module/AnalyticComponents/index.js +2 -0
- package/lib/module/AnalyticComponents/index.js.map +1 -0
- package/lib/module/SocialComponents/PodcastModule/api/index.js +28 -0
- package/lib/module/SocialComponents/PodcastModule/api/index.js.map +1 -1
- package/lib/module/SocialComponents/PodcastModule/components/ClaimPodcastModal.js +131 -0
- package/lib/module/SocialComponents/PodcastModule/components/ClaimPodcastModal.js.map +1 -0
- package/lib/module/SocialComponents/PodcastModule/index.js +236 -34
- package/lib/module/SocialComponents/PodcastModule/index.js.map +1 -1
- package/lib/typescript/src/AnalyticComponents/MarketPerformance/index.d.ts +1 -0
- package/lib/typescript/src/AnalyticComponents/MarketPerformance/index.d.ts.map +1 -0
- package/lib/typescript/src/AnalyticComponents/api/index.d.ts +5 -0
- package/lib/typescript/src/AnalyticComponents/api/index.d.ts.map +1 -0
- package/lib/typescript/src/AnalyticComponents/index.d.ts +1 -0
- package/lib/typescript/src/AnalyticComponents/index.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PodcastModule/api/index.d.ts +4 -1
- package/lib/typescript/src/SocialComponents/PodcastModule/api/index.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PodcastModule/components/ClaimPodcastModal.d.ts +11 -0
- package/lib/typescript/src/SocialComponents/PodcastModule/components/ClaimPodcastModal.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PodcastModule/index.d.ts +2 -1
- package/lib/typescript/src/SocialComponents/PodcastModule/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/AnalyticComponents/MarketPerformance/index.tsx +0 -0
- package/src/AnalyticComponents/api/index.ts +19 -0
- package/src/AnalyticComponents/index.tsx +0 -0
- package/src/SocialComponents/PodcastModule/api/index.ts +25 -1
- package/src/SocialComponents/PodcastModule/components/ClaimPodcastModal.tsx +79 -0
- package/src/SocialComponents/PodcastModule/index.tsx +136 -31
- package/src/types.d.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["AnalyticComponents/MarketPerformance/index.tsx"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AnalyticComponentApi = void 0;
|
|
7
|
+
var _ApiOverrides = require("../../ApiOverrides");
|
|
8
|
+
let EVENT_SVC_API = '';
|
|
9
|
+
let AUTH_SVC_API = '';
|
|
10
|
+
let MK_SVC_API = '';
|
|
11
|
+
const AnalyticComponentApi = exports.AnalyticComponentApi = {
|
|
12
|
+
setEnvironment: () => {
|
|
13
|
+
const endpoints = _ApiOverrides.APIOverrides.getEndpoints();
|
|
14
|
+
EVENT_SVC_API = endpoints['EVENT_SVC_API'];
|
|
15
|
+
MK_SVC_API = endpoints['MK_SVC_API'];
|
|
16
|
+
AUTH_SVC_API = endpoints['AUTH_SVC_API'];
|
|
17
|
+
console.log(EVENT_SVC_API, MK_SVC_API, AUTH_SVC_API);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_ApiOverrides","require","EVENT_SVC_API","AUTH_SVC_API","MK_SVC_API","AnalyticComponentApi","exports","setEnvironment","endpoints","APIOverrides","getEndpoints","console","log"],"sourceRoot":"../../../../src","sources":["AnalyticComponents/api/index.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAEA,IAAIC,aAAa,GAAG,EAAE;AACtB,IAAIC,YAAY,GAAG,EAAE;AACrB,IAAIC,UAAU,GAAG,EAAE;AAInB,MAAMC,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG;EACzBE,cAAc,EAAEA,CAAA,KAAM;IAClB,MAAMC,SAAS,GAAGC,0BAAY,CAACC,YAAY,CAAC,CAAC;IAC7CR,aAAa,GAAGM,SAAS,CAAC,eAAe,CAAW;IACpDJ,UAAU,GAAGI,SAAS,CAAC,YAAY,CAAW;IAC9CL,YAAY,GAAGK,SAAS,CAAC,cAAc,CAAW;IAClDG,OAAO,CAACC,GAAG,CAACV,aAAa,EAAEE,UAAU,EAAED,YAAY,CAAC;EACxD;AAGJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["AnalyticComponents/index.tsx"],"mappings":"","ignoreList":[]}
|
|
@@ -23,6 +23,34 @@ const PodcastApi = exports.PodcastApi = {
|
|
|
23
23
|
return undefined;
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
getMyDetails: async () => {
|
|
27
|
+
try {
|
|
28
|
+
const resp = await _axios.default.get(`${AUTH_SVC_API}/v1/players/player/me`);
|
|
29
|
+
return resp.data.player;
|
|
30
|
+
} catch (e) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
claimPodcast: async podcast_id => {
|
|
35
|
+
try {
|
|
36
|
+
const resp = await _axios.default.post(`${SOCIAL_SVC_API}/v1/podcasts/podcast/claim`, {
|
|
37
|
+
podcast_id
|
|
38
|
+
});
|
|
39
|
+
return resp.data.podcast;
|
|
40
|
+
} catch (e) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
approveClaim: async podcast_id => {
|
|
45
|
+
try {
|
|
46
|
+
const resp = await _axios.default.post(`${SOCIAL_SVC_API}/v1/podcasts/podcast/approve`, {
|
|
47
|
+
podcast_id
|
|
48
|
+
});
|
|
49
|
+
return resp.data.podcast;
|
|
50
|
+
} catch (e) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
},
|
|
26
54
|
getPodcastEpisodesByPodcast: async (podcast_id, offset) => {
|
|
27
55
|
try {
|
|
28
56
|
const resp = await _axios.default.get(`${SOCIAL_SVC_API}/v1/podcasts/episodes/podcast/${podcast_id}?offset=${offset}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_axios","_interopRequireDefault","require","_ApiOverrides","e","__esModule","default","SOCIAL_SVC_API","AUTH_SVC_API","PodcastApi","exports","setEnvironment","endpoints","APIOverrides","getEndpoints","getPodcastById","podcast_id","resp","axios","get","data","podcast","undefined","getPodcastEpisodesByPodcast","offset","console","log","podcast_episodes","player_podcast_episodes","getPlayersByPlayerIds","player_ids","length","
|
|
1
|
+
{"version":3,"names":["_axios","_interopRequireDefault","require","_ApiOverrides","e","__esModule","default","SOCIAL_SVC_API","AUTH_SVC_API","PodcastApi","exports","setEnvironment","endpoints","APIOverrides","getEndpoints","getPodcastById","podcast_id","resp","axios","get","data","podcast","undefined","getMyDetails","player","claimPodcast","post","approveClaim","getPodcastEpisodesByPodcast","offset","console","log","podcast_episodes","player_podcast_episodes","getPlayersByPlayerIds","player_ids","length","players"],"sourceRoot":"../../../../../src","sources":["SocialComponents/PodcastModule/api/index.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAAqD,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGrD,IAAIG,cAAc,GAAG,EAAE;AACvB,IAAIC,YAAY,GAAG,EAAE;AAIrB,MAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG;EACfE,cAAc,EAAEA,CAAA,KAAM;IAClB,MAAMC,SAAS,GAAGC,0BAAY,CAACC,YAAY,CAAC,CAAC;IAC7CP,cAAc,GAAGK,SAAS,CAAC,gBAAgB,CAAW;IACtDJ,YAAY,GAAGI,SAAS,CAAC,cAAc,CAAW;EACtD,CAAC;EACDG,cAAc,EAAE,MAAMC,UAAiB,IAAuC;IAC1E,IAAI;MACA,MAAMC,IAAI,GAAG,MAAMC,cAAK,CAACC,GAAG,CAAC,GAAGZ,cAAc,wBAAwBS,UAAU,EAAE,CAAC;MACnF,OAAOC,IAAI,CAACG,IAAI,CAACC,OAAO;IAC5B,CAAC,CAAC,OAAOjB,CAAC,EAAE;MACR,OAAOkB,SAAS;IACpB;EACJ,CAAC;EACDC,YAAY,EAAE,MAAAA,CAAA,KAA8C;IACxD,IAAI;MACA,MAAMN,IAAI,GAAG,MAAMC,cAAK,CAACC,GAAG,CAAC,GAAGX,YAAY,uBAAuB,CAAC;MACpE,OAAOS,IAAI,CAACG,IAAI,CAACI,MAAM;IAC3B,CAAC,CAAC,OAAOpB,CAAC,EAAE;MACR,OAAOkB,SAAS;IACpB;EACJ,CAAC;EACDG,YAAY,EAAE,MAAMT,UAAiB,I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OAAOlB,IAAI,CAACG,IAAI,CAACiB,OAAO;IAC5B,CAAC,CAAC,OAAOjC,CAAC,EAAE;MACR0B,OAAO,CAACC,GAAG,CAAC3B,CAAC,CAAC;MACd,OAAO,EAAE;IACb;EACJ;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _styles = require("../../../constants/styles");
|
|
10
|
+
var _Components = require("../../../Components");
|
|
11
|
+
var _colors = _interopRequireDefault(require("../../../constants/colors"));
|
|
12
|
+
var _api = require("../../api");
|
|
13
|
+
var _api2 = require("../api");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
const ClaimPodcastModal = ({
|
|
18
|
+
podcast,
|
|
19
|
+
onClose,
|
|
20
|
+
onPodcastUpdate
|
|
21
|
+
}) => {
|
|
22
|
+
const [loading, setLoading] = (0, _react.useState)(false);
|
|
23
|
+
const handleClaimPodcast = async () => {
|
|
24
|
+
setLoading(true);
|
|
25
|
+
const updated_pod = await _api2.PodcastApi.claimPodcast(podcast.podcast_id);
|
|
26
|
+
if (!updated_pod) {
|
|
27
|
+
return alert('Unable to process claim, please try again later.');
|
|
28
|
+
}
|
|
29
|
+
onPodcastUpdate(updated_pod);
|
|
30
|
+
setLoading(false);
|
|
31
|
+
};
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
33
|
+
style: {
|
|
34
|
+
..._styles.view_styles.section
|
|
35
|
+
}
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
37
|
+
style: {
|
|
38
|
+
..._styles.view_styles.section_header
|
|
39
|
+
}
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
41
|
+
source: {
|
|
42
|
+
uri: _api.SocialPodcastHelpers.getPodcastImage(podcast)
|
|
43
|
+
},
|
|
44
|
+
style: {
|
|
45
|
+
width: 50,
|
|
46
|
+
height: 50,
|
|
47
|
+
borderRadius: 4
|
|
48
|
+
},
|
|
49
|
+
resizeMode: "cover"
|
|
50
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
51
|
+
style: {
|
|
52
|
+
flex: 1,
|
|
53
|
+
marginLeft: 10
|
|
54
|
+
}
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
56
|
+
theme: "header"
|
|
57
|
+
}, "Is this your podcast?"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
58
|
+
style: {
|
|
59
|
+
marginTop: 3
|
|
60
|
+
},
|
|
61
|
+
theme: "body"
|
|
62
|
+
}, "Claim this podcast and get it prioritized over other similar podcasts!"))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
63
|
+
style: {
|
|
64
|
+
..._styles.view_styles.section_body
|
|
65
|
+
}
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
67
|
+
style: {
|
|
68
|
+
marginBottom: 10
|
|
69
|
+
},
|
|
70
|
+
theme: "header"
|
|
71
|
+
}, "Benefits of claiming podcast"), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
72
|
+
style: {
|
|
73
|
+
..._styles.view_styles.body_row,
|
|
74
|
+
alignItems: 'flex-start'
|
|
75
|
+
}
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
77
|
+
size: 40,
|
|
78
|
+
weight: "bold"
|
|
79
|
+
}, "*"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
80
|
+
style: {
|
|
81
|
+
marginLeft: 10
|
|
82
|
+
},
|
|
83
|
+
theme: "header_2"
|
|
84
|
+
}, "PodQuest, BettorEdge's proprietary podcast recommendation engine will suggest your podcast to interested parties based on their betting history!")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
85
|
+
style: {
|
|
86
|
+
..._styles.view_styles.body_row,
|
|
87
|
+
alignItems: 'flex-start',
|
|
88
|
+
paddingTop: 0
|
|
89
|
+
}
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
91
|
+
size: 40,
|
|
92
|
+
weight: "bold"
|
|
93
|
+
}, "*"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
94
|
+
style: {
|
|
95
|
+
marginLeft: 10
|
|
96
|
+
},
|
|
97
|
+
theme: "header_2"
|
|
98
|
+
}, "Adds the podcast to your profile for people to see your bets, takes, and podcasts all in one place!")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
99
|
+
style: {
|
|
100
|
+
..._styles.view_styles.body_row,
|
|
101
|
+
alignItems: 'flex-start',
|
|
102
|
+
paddingTop: 0
|
|
103
|
+
}
|
|
104
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
105
|
+
size: 40,
|
|
106
|
+
weight: "bold"
|
|
107
|
+
}, "*"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
108
|
+
style: {
|
|
109
|
+
marginLeft: 10
|
|
110
|
+
},
|
|
111
|
+
theme: "header_2"
|
|
112
|
+
}, "Additionally, it gets you a referral code allowing you to make money on users sent to BettorEdge!"))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
113
|
+
style: {
|
|
114
|
+
..._styles.view_styles.section_footer
|
|
115
|
+
}
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Button, {
|
|
117
|
+
title: "No Thanks",
|
|
118
|
+
style: {
|
|
119
|
+
flex: 1
|
|
120
|
+
},
|
|
121
|
+
padding: 15,
|
|
122
|
+
title_color: _colors.default.shades.white,
|
|
123
|
+
backgroundColor: _colors.default.utility.error,
|
|
124
|
+
onPress: () => onClose()
|
|
125
|
+
}), /*#__PURE__*/_react.default.createElement(_Components.Button, {
|
|
126
|
+
title: "Request Claim",
|
|
127
|
+
style: {
|
|
128
|
+
flex: 2,
|
|
129
|
+
marginLeft: 5,
|
|
130
|
+
opacity: loading ? 0.5 : 1
|
|
131
|
+
},
|
|
132
|
+
padding: 15,
|
|
133
|
+
disabled: loading,
|
|
134
|
+
title_color: _colors.default.shades.white,
|
|
135
|
+
backgroundColor: _colors.default.utility.success,
|
|
136
|
+
onPress: () => handleClaimPodcast()
|
|
137
|
+
})));
|
|
138
|
+
};
|
|
139
|
+
var _default = exports.default = ClaimPodcastModal;
|
|
140
|
+
//# sourceMappingURL=ClaimPodcastModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_styles","_Components","_colors","_interopRequireDefault","_api","_api2","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ClaimPodcastModal","podcast","onClose","onPodcastUpdate","loading","setLoading","useState","handleClaimPodcast","updated_pod","PodcastApi","claimPodcast","podcast_id","alert","createElement","View","style","view_styles","section","section_header","Image","source","uri","SocialPodcastHelpers","getPodcastImage","width","height","borderRadius","resizeMode","flex","marginLeft","Text","theme","marginTop","section_body","marginBottom","body_row","alignItems","size","weight","paddingTop","section_footer","Button","title","padding","title_color","Colors","shades","white","backgroundColor","utility","error","onPress","opacity","disabled","success","_default","exports"],"sourceRoot":"../../../../../src","sources":["SocialComponents/PodcastModule/components/ClaimPodcastModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AAAoC,SAAAK,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,OAAAC,cAAA,C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AAAyC,IAAI;IAACC,KAAK,EAAE;MAAE,GAAGC,mBAAW,CAACwB;IAAe;EAAE,gBAC3CtE,MAAA,CAAAY,OAAA,CAAA+B,aAAA,CAACtC,WAAA,CAAAkE,MAAM;IACHC,KAAK,EAAC,WAAW;IACjB3B,KAAK,EAAE;MAACa,IAAI,EAAC;IAAC,CAAE;IAChBe,OAAO,EAAE,EAAG;IACZC,WAAW,EAAEC,eAAM,CAACC,MAAM,CAACC,KAAM;IACjCC,eAAe,EAAEH,eAAM,CAACI,OAAO,CAACC,KAAM;IACtCC,OAAO,EAAEA,CAAA,KAAMjD,OAAO,CAAC;EAAE,CAC5B,CAAC,eACDhC,MAAA,CAAAY,OAAA,CAAA+B,aAAA,CAACtC,WAAA,CAAAkE,MAAM;IACJC,KAAK,EAAC,eAAe;IACrB3B,KAAK,EAAE;MAACa,IAAI,EAAC,CAAC;MAAEC,UAAU,EAAC,CAAC;MAAEuB,OAAO,EAAChD,OAAO,GAAC,GAAG,GAAC;IAAC,CAAE;IACrDuC,OAAO,EAAE,EAAG;IACZU,QAAQ,EAAEjD,OAAQ;IAClBwC,WAAW,EAAEC,eAAM,CAACC,MAAM,CAACC,KAAM;IACjCC,eAAe,EAAEH,eAAM,CAACI,OAAO,CAACK,OAAQ;IACxCH,OAAO,EAAEA,CAAA,KAAM5C,kBAAkB,CAAC;EAAE,CACvC,CACC,CACJ,CAAC;AAEf,CAAC;AAAA,IAAAgD,QAAA,GAAAC,OAAA,CAAA1E,OAAA,GAEckB,iBAAiB","ignoreList":[]}
|
|
@@ -14,11 +14,13 @@ var _Components = require("../../Components");
|
|
|
14
14
|
var _PodcastEpisodeCard = _interopRequireDefault(require("../PodcastEpisodeCard"));
|
|
15
15
|
var _momentMini = _interopRequireDefault(require("moment-mini"));
|
|
16
16
|
var _PlayerCard = _interopRequireDefault(require("../PlayerCard"));
|
|
17
|
+
var _ClaimPodcastModal = _interopRequireDefault(require("./components/ClaimPodcastModal"));
|
|
17
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
21
|
const PodcastModule = ({
|
|
21
22
|
podcast_id,
|
|
23
|
+
player_id,
|
|
22
24
|
padding_insets,
|
|
23
25
|
onSelectEpisode,
|
|
24
26
|
onBack,
|
|
@@ -30,6 +32,7 @@ const PodcastModule = ({
|
|
|
30
32
|
height: 700,
|
|
31
33
|
width: 330
|
|
32
34
|
});
|
|
35
|
+
const [show_claim, setShowClaim] = (0, _react.useState)(false);
|
|
33
36
|
const [pod_data, setPodData] = (0, _react.useState)({
|
|
34
37
|
loading: false,
|
|
35
38
|
episodes_loading: false,
|
|
@@ -45,8 +48,10 @@ const PodcastModule = ({
|
|
|
45
48
|
podcast_episodes,
|
|
46
49
|
episodes_offset,
|
|
47
50
|
players,
|
|
48
|
-
player_podcast_episodes
|
|
51
|
+
player_podcast_episodes,
|
|
52
|
+
player
|
|
49
53
|
} = pod_data;
|
|
54
|
+
const claimed_player = pod_data.players.find(p => p.player_id == podcast?.claimed_player_id);
|
|
50
55
|
(0, _react.useEffect)(() => {
|
|
51
56
|
_api.PodcastApi.setEnvironment();
|
|
52
57
|
getPodDataFromServer(podcast_id, 0);
|
|
@@ -58,12 +63,21 @@ const PodcastModule = ({
|
|
|
58
63
|
});
|
|
59
64
|
const pod = await _api.PodcastApi.getPodcastById(id);
|
|
60
65
|
const pod_ep = await _api.PodcastApi.getPodcastEpisodesByPodcast(id, offset);
|
|
66
|
+
let me = undefined;
|
|
67
|
+
if (player_id) {
|
|
68
|
+
me = await _api.PodcastApi.getMyDetails();
|
|
69
|
+
}
|
|
70
|
+
let player_ids = pod?.player_ids ?? [];
|
|
71
|
+
if (pod?.claimed_player_id) {
|
|
72
|
+
player_ids.push(pod.claimed_player_id);
|
|
73
|
+
}
|
|
61
74
|
const ps = await _api.PodcastApi.getPlayersByPlayerIds(pod?.player_ids);
|
|
62
75
|
setPodData({
|
|
63
76
|
...pod_data,
|
|
64
77
|
loading: false,
|
|
65
78
|
episodes_loading: false,
|
|
66
79
|
podcast: pod,
|
|
80
|
+
player: me,
|
|
67
81
|
players: ps,
|
|
68
82
|
podcast_episodes: pod_ep.podcast_episodes,
|
|
69
83
|
player_podcast_episodes: pod_ep.player_podcast_episodes,
|
|
@@ -84,6 +98,16 @@ const PodcastModule = ({
|
|
|
84
98
|
episodes_offset: offset
|
|
85
99
|
});
|
|
86
100
|
};
|
|
101
|
+
const approveClaim = async () => {
|
|
102
|
+
if (!player || player.role != 'admin') {
|
|
103
|
+
return alert('Not eligible to approve this request');
|
|
104
|
+
}
|
|
105
|
+
const pod = await _api.PodcastApi.approveClaim(podcast_id);
|
|
106
|
+
setPodData({
|
|
107
|
+
...pod_data,
|
|
108
|
+
podcast: pod
|
|
109
|
+
});
|
|
110
|
+
};
|
|
87
111
|
const renderPlayers = data => {
|
|
88
112
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
89
113
|
style: {
|
|
@@ -124,6 +148,12 @@ const PodcastModule = ({
|
|
|
124
148
|
color: _colors.default.brand.midnight
|
|
125
149
|
}));
|
|
126
150
|
}
|
|
151
|
+
let height = module_size.height * 0.5;
|
|
152
|
+
let width = module_size.width;
|
|
153
|
+
let description = `${podcast.description.slice(0, 200)}...`;
|
|
154
|
+
if (podcast.description_override) {
|
|
155
|
+
description = `${podcast.description.slice(0, 200)}...`;
|
|
156
|
+
}
|
|
127
157
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
128
158
|
style: {
|
|
129
159
|
flex: 1
|
|
@@ -131,7 +161,7 @@ const PodcastModule = ({
|
|
|
131
161
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
132
162
|
style: {
|
|
133
163
|
flex: 1,
|
|
134
|
-
backgroundColor: _colors.default.shades.
|
|
164
|
+
backgroundColor: _colors.default.shades.white
|
|
135
165
|
},
|
|
136
166
|
onLayout: ev => {
|
|
137
167
|
const {
|
|
@@ -143,58 +173,174 @@ const PodcastModule = ({
|
|
|
143
173
|
height
|
|
144
174
|
});
|
|
145
175
|
}
|
|
146
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.
|
|
176
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
147
177
|
style: {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
},
|
|
153
|
-
nativeID: "profile_image"
|
|
178
|
+
flex: 1
|
|
179
|
+
}
|
|
180
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
181
|
+
nativeID: "podcast_header"
|
|
154
182
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
155
183
|
source: {
|
|
156
184
|
uri: _api2.SocialPodcastHelpers.getPodcastImage(podcast)
|
|
157
185
|
},
|
|
158
186
|
style: {
|
|
159
|
-
width
|
|
160
|
-
height
|
|
161
|
-
borderBottomRightRadius: 50,
|
|
162
|
-
borderBottomLeftRadius: 50
|
|
187
|
+
width,
|
|
188
|
+
height
|
|
163
189
|
},
|
|
164
190
|
resizeMode: "cover"
|
|
165
|
-
})
|
|
191
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
166
192
|
style: {
|
|
167
|
-
|
|
193
|
+
padding: 20,
|
|
194
|
+
position: 'absolute',
|
|
195
|
+
bottom: 0,
|
|
196
|
+
left: 0,
|
|
197
|
+
right: 0,
|
|
198
|
+
...style.blur
|
|
168
199
|
}
|
|
169
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.
|
|
200
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
201
|
+
onPress: () => {
|
|
202
|
+
let episode = podcast_episodes.sort((a, b) => (0, _momentMini.default)(b.publish_date).unix() - (0, _momentMini.default)(a.publish_date).unix())[0];
|
|
203
|
+
if (!episode) {
|
|
204
|
+
return alert('Unable to process');
|
|
205
|
+
}
|
|
206
|
+
onSelectEpisode(episode);
|
|
207
|
+
},
|
|
208
|
+
disabled: podcast_episodes.length == 0 ? true : false,
|
|
170
209
|
style: {
|
|
171
|
-
|
|
172
|
-
|
|
210
|
+
padding: 10,
|
|
211
|
+
borderRadius: 8,
|
|
212
|
+
width: module_size.width * 0.7,
|
|
213
|
+
flexDirection: 'row',
|
|
214
|
+
alignItems: 'center',
|
|
215
|
+
justifyContent: 'center',
|
|
216
|
+
alignSelf: 'center',
|
|
217
|
+
backgroundColor: _colors.default.shades.white,
|
|
218
|
+
..._styles.view_styles.float
|
|
173
219
|
}
|
|
174
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
220
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.PlayIcon, {
|
|
221
|
+
size: 20,
|
|
222
|
+
color: _colors.default.brand.electric
|
|
223
|
+
}), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
175
224
|
style: {
|
|
176
|
-
|
|
225
|
+
marginLeft: 15
|
|
226
|
+
},
|
|
227
|
+
weight: "bold",
|
|
228
|
+
color: _colors.default.brand.electric
|
|
229
|
+
}, "Play Episode")), !podcast.claim_status ? /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
230
|
+
style: {
|
|
231
|
+
padding: 10,
|
|
232
|
+
marginTop: 5,
|
|
233
|
+
borderRadius: 8,
|
|
234
|
+
width: module_size.width * 0.7,
|
|
235
|
+
flexDirection: 'row',
|
|
236
|
+
alignItems: 'center',
|
|
237
|
+
justifyContent: 'center',
|
|
238
|
+
alignSelf: 'center',
|
|
239
|
+
backgroundColor: _colors.default.utility.success,
|
|
240
|
+
..._styles.view_styles.float
|
|
241
|
+
},
|
|
242
|
+
onPress: () => setShowClaim(true)
|
|
243
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.HeadphoneIcon, {
|
|
244
|
+
size: 20,
|
|
245
|
+
color: _colors.default.shades.white
|
|
246
|
+
}), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
247
|
+
style: {
|
|
248
|
+
marginLeft: 15
|
|
249
|
+
},
|
|
250
|
+
weight: "bold",
|
|
251
|
+
color: _colors.default.shades.white
|
|
252
|
+
}, "Claim This Podcast!")) : podcast.claim_status == 'requested' && player?.role != 'admin' ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
253
|
+
style: {
|
|
254
|
+
padding: 10,
|
|
255
|
+
marginTop: 5,
|
|
256
|
+
borderRadius: 8,
|
|
257
|
+
width: module_size.width * 0.7,
|
|
258
|
+
flexDirection: 'row',
|
|
259
|
+
alignItems: 'center',
|
|
260
|
+
justifyContent: 'center',
|
|
261
|
+
alignSelf: 'center',
|
|
262
|
+
backgroundColor: _colors.default.brand.midnight,
|
|
263
|
+
..._styles.view_styles.float
|
|
177
264
|
}
|
|
178
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
265
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.HeadphoneIcon, {
|
|
266
|
+
size: 20,
|
|
267
|
+
color: _colors.default.shades.white
|
|
268
|
+
}), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
179
269
|
style: {
|
|
180
|
-
|
|
270
|
+
marginLeft: 15
|
|
271
|
+
},
|
|
272
|
+
weight: "bold",
|
|
273
|
+
color: _colors.default.shades.white
|
|
274
|
+
}, "Claim Requested!")) : podcast.claim_status == 'requested' && player?.role == 'admin' ? /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
275
|
+
style: {
|
|
276
|
+
padding: 10,
|
|
277
|
+
marginTop: 5,
|
|
278
|
+
borderRadius: 8,
|
|
279
|
+
width: module_size.width * 0.7,
|
|
280
|
+
flexDirection: 'row',
|
|
281
|
+
alignItems: 'center',
|
|
282
|
+
justifyContent: 'center',
|
|
283
|
+
alignSelf: 'center',
|
|
284
|
+
backgroundColor: _colors.default.utility.success,
|
|
285
|
+
..._styles.view_styles.float
|
|
286
|
+
},
|
|
287
|
+
onPress: () => approveClaim()
|
|
288
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.HeadphoneIcon, {
|
|
289
|
+
size: 20,
|
|
290
|
+
color: _colors.default.shades.white
|
|
291
|
+
}), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
292
|
+
style: {
|
|
293
|
+
marginLeft: 15
|
|
294
|
+
},
|
|
295
|
+
weight: "bold",
|
|
296
|
+
color: _colors.default.shades.white
|
|
297
|
+
}, "Approve Claim Request!")) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
298
|
+
style: {
|
|
299
|
+
marginTop: 10
|
|
181
300
|
}
|
|
182
301
|
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
183
|
-
|
|
302
|
+
size: 24,
|
|
303
|
+
weight: "bold",
|
|
304
|
+
color: _colors.default.shades.white
|
|
184
305
|
}, podcast.title), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
185
306
|
style: {
|
|
186
307
|
marginTop: 4
|
|
187
308
|
},
|
|
188
|
-
|
|
189
|
-
|
|
309
|
+
color: _colors.default.shades.white,
|
|
310
|
+
weight: "semibold"
|
|
311
|
+
}, description)), podcast.claim_status == 'claimed' ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
190
312
|
style: {
|
|
191
|
-
|
|
192
|
-
|
|
313
|
+
position: 'absolute',
|
|
314
|
+
top: 20,
|
|
315
|
+
left: 5,
|
|
316
|
+
height: 40,
|
|
317
|
+
width: 40,
|
|
318
|
+
borderRadius: 100,
|
|
319
|
+
justifyContent: 'center',
|
|
320
|
+
alignItems: 'center'
|
|
321
|
+
}
|
|
322
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.CheckCirlceIcon, {
|
|
323
|
+
size: 30,
|
|
324
|
+
color: _colors.default.utility.success
|
|
325
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), podcast.claim_status == 'claimed' && claimed_player ? /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
326
|
+
style: {
|
|
327
|
+
position: 'absolute',
|
|
328
|
+
top: 20,
|
|
329
|
+
right: 5,
|
|
330
|
+
justifyContent: 'center',
|
|
331
|
+
alignItems: 'center'
|
|
193
332
|
},
|
|
194
|
-
onPress: () =>
|
|
195
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
196
|
-
|
|
197
|
-
|
|
333
|
+
onPress: () => onSelectPlayer ? onSelectPlayer(claimed_player) : console.log('')
|
|
334
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
335
|
+
source: {
|
|
336
|
+
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'
|
|
337
|
+
},
|
|
338
|
+
style: {
|
|
339
|
+
height: 40,
|
|
340
|
+
width: 40,
|
|
341
|
+
borderRadius: 100
|
|
342
|
+
},
|
|
343
|
+
resizeMode: "cover"
|
|
198
344
|
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null))), players.length > 0 ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
199
345
|
style: {
|
|
200
346
|
..._styles.view_styles.section
|
|
@@ -285,11 +431,17 @@ const PodcastModule = ({
|
|
|
285
431
|
item: e,
|
|
286
432
|
index: i
|
|
287
433
|
});
|
|
288
|
-
}))))),
|
|
434
|
+
}))))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
289
435
|
style: {
|
|
290
436
|
position: 'absolute',
|
|
291
437
|
top: padding_insets?.top ?? 0,
|
|
292
438
|
left: 0,
|
|
439
|
+
right: 0,
|
|
440
|
+
flexDirection: 'row',
|
|
441
|
+
alignItems: 'center'
|
|
442
|
+
}
|
|
443
|
+
}, onBack ? /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
444
|
+
style: {
|
|
293
445
|
..._styles.view_styles.section,
|
|
294
446
|
backgroundColor: _colors.default.shades.shade100,
|
|
295
447
|
height: 50,
|
|
@@ -303,7 +455,57 @@ const PodcastModule = ({
|
|
|
303
455
|
direction: "left",
|
|
304
456
|
color: _colors.default.brand.midnight,
|
|
305
457
|
size: 14
|
|
306
|
-
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null)
|
|
458
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
459
|
+
style: {
|
|
460
|
+
flex: 1
|
|
461
|
+
}
|
|
462
|
+
}), onSharePodcast ? /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
463
|
+
style: {
|
|
464
|
+
..._styles.view_styles.section,
|
|
465
|
+
backgroundColor: _colors.default.shades.shade100,
|
|
466
|
+
height: 50,
|
|
467
|
+
width: 50,
|
|
468
|
+
borderRadius: 100,
|
|
469
|
+
justifyContent: 'center',
|
|
470
|
+
alignItems: 'center'
|
|
471
|
+
},
|
|
472
|
+
onPress: () => onSharePodcast(podcast)
|
|
473
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.ShareIcon, {
|
|
474
|
+
color: _colors.default.brand.electric,
|
|
475
|
+
size: 14
|
|
476
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null))), show_claim ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
477
|
+
style: {
|
|
478
|
+
position: 'absolute',
|
|
479
|
+
flex: 1,
|
|
480
|
+
backgroundColor: _colors.default.shades.black_faded,
|
|
481
|
+
top: 0,
|
|
482
|
+
left: 0,
|
|
483
|
+
right: 0,
|
|
484
|
+
bottom: 0,
|
|
485
|
+
justifyContent: 'flex-end'
|
|
486
|
+
}
|
|
487
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Spring, {
|
|
488
|
+
slide: "vertical",
|
|
489
|
+
to: 0,
|
|
490
|
+
from: 500
|
|
491
|
+
}, /*#__PURE__*/_react.default.createElement(_ClaimPodcastModal.default, {
|
|
492
|
+
podcast: podcast,
|
|
493
|
+
width: module_size.width - 20,
|
|
494
|
+
onClose: () => setShowClaim(false),
|
|
495
|
+
onPodcastUpdate: pod => {
|
|
496
|
+
setShowClaim(false);
|
|
497
|
+
setPodData({
|
|
498
|
+
...pod_data,
|
|
499
|
+
podcast: pod
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
}))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null));
|
|
307
503
|
};
|
|
308
504
|
var _default = exports.default = PodcastModule;
|
|
505
|
+
const style = {
|
|
506
|
+
blur: {
|
|
507
|
+
backdropFilter: 'blur(75px)',
|
|
508
|
+
backgroundColor: _colors.default.shades.black_faded_heavy
|
|
509
|
+
}
|
|
510
|
+
};
|
|
309
511
|
//# sourceMappingURL=index.js.map
|