react-native-flyy 1.4.43 → 1.4.45
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/android/build.gradle +1 -1
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/reactnativeflyy/FlyyModule.kt +22 -2
- package/lib/commonjs/flyy_checkin_view.js +8 -38
- package/lib/commonjs/flyy_checkin_view.js.map +1 -1
- package/lib/commonjs/index.js +24 -70
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/flyy_checkin_view.js +5 -28
- package/lib/module/flyy_checkin_view.js.map +1 -1
- package/lib/module/index.js +24 -50
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/flyy_checkin_view.d.ts +2 -2
- package/lib/typescript/index.d.ts +4 -4
- package/package.json +5 -5
package/android/build.gradle
CHANGED
|
@@ -134,7 +134,7 @@ dependencies {
|
|
|
134
134
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
135
135
|
|
|
136
136
|
//Flyy sdk dependency
|
|
137
|
-
implementation 'com.github.roid-software:flyy-sdk:1.4.
|
|
137
|
+
implementation 'com.github.roid-software:flyy-sdk:1.4.55.26'
|
|
138
138
|
// implementation project(path: ':flyy')
|
|
139
139
|
|
|
140
140
|
implementation 'com.google.code.gson:gson:2.8.7'
|
|
@@ -334,7 +334,7 @@ class FlyyModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaMo
|
|
|
334
334
|
|
|
335
335
|
@ReactMethod
|
|
336
336
|
fun setCustomFontName(regularFont: String?, mediumFont: String?, boldFont: String?) {
|
|
337
|
-
Flyy.setCustomFontName(regularFont,mediumFont, boldFont)
|
|
337
|
+
//Flyy.setCustomFontName(regularFont,mediumFont, boldFont)
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
@ReactMethod
|
|
@@ -479,7 +479,7 @@ class FlyyModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaMo
|
|
|
479
479
|
|
|
480
480
|
@ReactMethod
|
|
481
481
|
fun setCustomThemeColor(topBgColor: String, mainBgColor: String, shadowBgColor: String, offersCardBgColor: String, buttonBGColor: String, headingTextColor: String, subHeadingTextColor: String, extraTextColor: String, labelsTextColor: String, walletCardColor: String, walletInnerCardColor: String, walletSubHeadingColor: String, scratchCardBgColor: String, scratchCardInnerColor: String) {
|
|
482
|
-
Flyy.setDarkThemeColor(topBgColor, mainBgColor, shadowBgColor, offersCardBgColor, buttonBGColor, headingTextColor, subHeadingTextColor, extraTextColor, labelsTextColor, walletCardColor, walletInnerCardColor, walletSubHeadingColor, scratchCardBgColor, scratchCardInnerColor)
|
|
482
|
+
//Flyy.setDarkThemeColor(topBgColor, mainBgColor, shadowBgColor, offersCardBgColor, buttonBGColor, headingTextColor, subHeadingTextColor, extraTextColor, labelsTextColor, walletCardColor, walletInnerCardColor, walletSubHeadingColor, scratchCardBgColor, scratchCardInnerColor)
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
|
|
@@ -811,6 +811,26 @@ fun getPreviousLeaderboardWinners(tag: String, callBack: Callback) {
|
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
813
|
|
|
814
|
+
@ReactMethod
|
|
815
|
+
fun navigateToHome(shouldNavigateToHome: Boolean, noTournamentLabel: String, quizCompletionLabel: String,checkedInButtonText: String) {
|
|
816
|
+
//Flyy.navigateToHome(shouldNavigateToHome,noTournamentLabel,quizCompletionLabel,checkedInButtonText);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
@ReactMethod
|
|
820
|
+
fun setReferralCodeHide(hideReferralCode: Boolean) {
|
|
821
|
+
// Flyy.setReferralCodeHide(hideReferralCode);
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
@ReactMethod
|
|
825
|
+
fun hideSCPopupDetails(hideScDate: Boolean,hideScRefNum: Boolean) {
|
|
826
|
+
//(hideScDate,hideScRefNum);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
@ReactMethod
|
|
830
|
+
fun setGiftCardRedeemText(hintTextName: String, hintTextEmail: String,receiverName: String,receiverEmail: String) {
|
|
831
|
+
//Flyy.setGiftCardRedeemText(hintTextName,hintTextEmail,receiverName,receiverEmail);
|
|
832
|
+
}
|
|
833
|
+
|
|
814
834
|
@Throws(JSONException::class)
|
|
815
835
|
private fun convertMapToJson(readableMap: ReadableMap?): JSONObject? {
|
|
816
836
|
val `object` = JSONObject()
|
|
@@ -4,25 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } // @ts-nocheck
|
|
18
14
|
const {
|
|
19
15
|
Flyy
|
|
20
16
|
} = _reactNative.NativeModules;
|
|
21
|
-
|
|
22
17
|
class FlyyCheckinComponent extends _react.Component {
|
|
23
18
|
constructor(...args) {
|
|
24
19
|
super(...args);
|
|
25
|
-
|
|
26
20
|
_defineProperty(this, "state", {
|
|
27
21
|
mileStoneData: [],
|
|
28
22
|
checkinOffer: [],
|
|
@@ -34,7 +28,6 @@ class FlyyCheckinComponent extends _react.Component {
|
|
|
34
28
|
environment: 0
|
|
35
29
|
});
|
|
36
30
|
}
|
|
37
|
-
|
|
38
31
|
async componentDidMount() {
|
|
39
32
|
try {
|
|
40
33
|
const data = await Flyy.getUserData();
|
|
@@ -48,10 +41,8 @@ class FlyyCheckinComponent extends _react.Component {
|
|
|
48
41
|
} catch (e) {
|
|
49
42
|
console.error(e);
|
|
50
43
|
}
|
|
51
|
-
|
|
52
44
|
await this.fetchData();
|
|
53
45
|
}
|
|
54
|
-
|
|
55
46
|
async fetchData() {
|
|
56
47
|
this.setState({
|
|
57
48
|
listItems: []
|
|
@@ -64,7 +55,6 @@ class FlyyCheckinComponent extends _react.Component {
|
|
|
64
55
|
}
|
|
65
56
|
});
|
|
66
57
|
const data = await resp.json();
|
|
67
|
-
|
|
68
58
|
for (var key in data.info.offers) {
|
|
69
59
|
if (data.info.offers[key].offer_type_code === "checkin") {
|
|
70
60
|
this.setState({
|
|
@@ -76,22 +66,18 @@ class FlyyCheckinComponent extends _react.Component {
|
|
|
76
66
|
break;
|
|
77
67
|
}
|
|
78
68
|
}
|
|
79
|
-
|
|
80
69
|
var tempData = [];
|
|
81
70
|
var isRewardDay = false;
|
|
82
71
|
var isCheckedIn = false;
|
|
83
|
-
|
|
84
72
|
for (let i = 0; i < this.state.checkinOffer.total_streak; i++) {
|
|
85
73
|
for (let j = 0; j < this.state.mileStoneData.length; j++) {
|
|
86
74
|
if (i + 1 === parseInt(this.state.mileStoneData[j].value)) {
|
|
87
75
|
isRewardDay = true;
|
|
88
76
|
}
|
|
89
77
|
}
|
|
90
|
-
|
|
91
78
|
if (i + 1 <= this.state.checkinOffer.streak) {
|
|
92
79
|
isCheckedIn = true;
|
|
93
80
|
}
|
|
94
|
-
|
|
95
81
|
tempData.push({
|
|
96
82
|
"isRewardDay": isRewardDay,
|
|
97
83
|
"isCheckedIn": isCheckedIn
|
|
@@ -99,12 +85,10 @@ class FlyyCheckinComponent extends _react.Component {
|
|
|
99
85
|
isRewardDay = false;
|
|
100
86
|
isCheckedIn = false;
|
|
101
87
|
}
|
|
102
|
-
|
|
103
88
|
this.setState({
|
|
104
89
|
listItems: tempData
|
|
105
90
|
});
|
|
106
91
|
}
|
|
107
|
-
|
|
108
92
|
async checkInApi() {
|
|
109
93
|
var url = `https://${this.state.environment == 0 ? "ghc-stage" : "ghc"}.theflyy.com/api/v1/checkin?offer_id=` + this.state.checkinOffer.id.toString();
|
|
110
94
|
const resp = await fetch(url, {
|
|
@@ -115,24 +99,21 @@ class FlyyCheckinComponent extends _react.Component {
|
|
|
115
99
|
}
|
|
116
100
|
});
|
|
117
101
|
const data = await resp.json();
|
|
118
|
-
|
|
119
102
|
if (data.success) {
|
|
120
103
|
this.fetchData();
|
|
121
104
|
} else {
|
|
122
105
|
this.notifyMessage(data.message);
|
|
123
106
|
}
|
|
124
107
|
}
|
|
125
|
-
|
|
126
108
|
notifyMessage(msg) {
|
|
127
109
|
if (_reactNative.Platform.OS === 'android') {
|
|
128
110
|
_reactNative.ToastAndroid.show(msg, _reactNative.ToastAndroid.SHORT);
|
|
129
|
-
} else {
|
|
111
|
+
} else {
|
|
112
|
+
// Toast.showWithGravity(msg, Toast.SHORT, Toast.BOTTOM);
|
|
130
113
|
}
|
|
131
114
|
}
|
|
132
|
-
|
|
133
115
|
render() {
|
|
134
116
|
var _this$props$style$che3, _this$props$style3, _this$props$style$fon, _this$props$style4, _this$state$checkinOf, _this$props$style$che4, _this$props$style5, _this$props$style$fon2, _this$props$style6, _this$props$style$che5, _this$props$style7;
|
|
135
|
-
|
|
136
117
|
const Divider = ({
|
|
137
118
|
color = "black",
|
|
138
119
|
index
|
|
@@ -162,22 +143,18 @@ class FlyyCheckinComponent extends _react.Component {
|
|
|
162
143
|
}));
|
|
163
144
|
})));
|
|
164
145
|
};
|
|
165
|
-
|
|
166
146
|
const getItemCount = () => this.state.listItems.length;
|
|
167
|
-
|
|
168
147
|
const getItem = (data, index) => ({
|
|
169
148
|
id: Math.random().toString(12).substring(0),
|
|
170
149
|
isRewardDay: data[index].isRewardDay,
|
|
171
150
|
isCheckedIn: data[index].isCheckedIn,
|
|
172
151
|
index: index
|
|
173
152
|
});
|
|
174
|
-
|
|
175
153
|
const Item = ({
|
|
176
154
|
title,
|
|
177
155
|
index
|
|
178
156
|
}) => {
|
|
179
157
|
var _this$props$style$che, _this$props$style, _this$props$style$che2, _this$props$style2;
|
|
180
|
-
|
|
181
158
|
const day = index + 1;
|
|
182
159
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
183
160
|
style: {
|
|
@@ -257,7 +234,6 @@ class FlyyCheckinComponent extends _react.Component {
|
|
|
257
234
|
}
|
|
258
235
|
}, title.isRewardDay ? title.isCheckedIn ? "Won" : "Earn" : title.isCheckedIn ? "Day " + day : "Day " + day));
|
|
259
236
|
};
|
|
260
|
-
|
|
261
237
|
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
262
238
|
style: styles.main,
|
|
263
239
|
onPress: () => {
|
|
@@ -322,11 +298,9 @@ class FlyyCheckinComponent extends _react.Component {
|
|
|
322
298
|
onPress: async () => {
|
|
323
299
|
const eventId = this.state.checkinOffer["event_id"];
|
|
324
300
|
const url = this.state.checkinOffer["deeplink"];
|
|
325
|
-
|
|
326
301
|
if (eventId != null) {
|
|
327
302
|
if (url != "") {
|
|
328
303
|
const supported = await _reactNative.Linking.canOpenURL(url);
|
|
329
|
-
|
|
330
304
|
if (supported) {
|
|
331
305
|
await _reactNative.Linking.openURL(url);
|
|
332
306
|
}
|
|
@@ -345,9 +319,7 @@ class FlyyCheckinComponent extends _react.Component {
|
|
|
345
319
|
}
|
|
346
320
|
}, this.state.checkinOffer["checked_in"] ? "Checked In" : this.state.checkinOffer["button_text"] != "" ? this.state.checkinOffer["button_text"] : "Check In")));
|
|
347
321
|
}
|
|
348
|
-
|
|
349
322
|
}
|
|
350
|
-
|
|
351
323
|
const styles = _reactNative.StyleSheet.create({
|
|
352
324
|
main: {
|
|
353
325
|
backgroundColor: "white",
|
|
@@ -373,7 +345,5 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
373
345
|
justifyContent: "center"
|
|
374
346
|
}
|
|
375
347
|
});
|
|
376
|
-
|
|
377
|
-
var _default = FlyyCheckinComponent;
|
|
378
|
-
exports.default = _default;
|
|
348
|
+
var _default = exports.default = FlyyCheckinComponent;
|
|
379
349
|
//# sourceMappingURL=flyy_checkin_view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["flyy_checkin_view.tsx"],"names":["Flyy","NativeModules","FlyyCheckinComponent","Component","mileStoneData","checkinOffer","listItems","persons","partnerId","userId","appData","environment","componentDidMount","data","getUserData","getAppData","setState","e","console","error","fetchData","resp","fetch","state","headers","json","key","info","offers","offer_type_code","milestones","tempData","isRewardDay","isCheckedIn","i","total_streak","j","length","parseInt","value","streak","push","checkInApi","url","id","toString","success","notifyMessage","message","msg","Platform","OS","ToastAndroid","show","SHORT","render","Divider","color","index","flexDirection","React","Children","toArray","map","height","width","backgroundColor","borderRadius","getItemCount","getItem","Math","random","substring","Item","title","day","justifyContent","alignItems","alignContent","alignSelf","require","uri","fontSize","textAlign","props","style","checkInEarnColor","checkInDaysColor","styles","main","openFlyyCheckinPage","checkInTitleColor","fontFamily","checkInDescriptionColor","replace","listContainer","item","button","eventId","supported","Linking","canOpenURL","openURL","checkInBtnTextColor","paddingLeft","paddingRight","StyleSheet","create","elevation"],"mappings":";;;;;;;AACA;;AACA;;;;;;;;AACA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,0BAAjB;;AAEA,MAAMC,oBAAN,SAAmCC,gBAAnC,CAA6C;AAAA;AAAA;;AAAA,mCAEjC;AACJC,MAAAA,aAAa,EAAE,EADX;AAEJC,MAAAA,YAAY,EAAE,EAFV;AAGJC,MAAAA,SAAS,EAAE,EAHP;AAIJC,MAAAA,OAAO,EAAE,CAAC,CAAD,EAAG,CAAH,EAAK,CAAL,EAAO,CAAP,EAAS,CAAT,CAJL;AAKJC,MAAAA,SAAS,EAAE,EALP;AAMJC,MAAAA,MAAM,EAAE,EANJ;AAOJC,MAAAA,OAAO,EAAE,EAPL;AAQJC,MAAAA,WAAW,EAAE;AART,KAFiC;AAAA;;AAalB,QAAjBC,iBAAiB,GAAE;AACvB,QAAI;AACF,YAAMC,IAAI,GAAG,MAAMb,IAAI,CAACc,WAAL,EAAnB;AACA,YAAMJ,OAAO,GAAG,MAAMV,IAAI,CAACe,UAAL,EAAtB;AACA,WAAKC,QAAL,CAAc;AACFR,QAAAA,SAAS,EAAGK,IAAI,CAAC,YAAD,CADd;AAEFJ,QAAAA,MAAM,EAAGI,IAAI,CAAC,SAAD,CAFX;AAGFF,QAAAA,WAAW,EAAGE,IAAI,CAAC,aAAD,CAHhB;AAIFH,QAAAA,OAAO,EAAEA;AAJP,OAAd;AAMD,KATD,CASE,OAAOO,CAAP,EAAU;AACVC,MAAAA,OAAO,CAACC,KAAR,CAAcF,CAAd;AACD;;AAEC,UAAM,KAAKG,SAAL,EAAN;AACH;;AAGc,QAATA,SAAS,GAAE;AACb,SAAKJ,QAAL,CAAc;AAAEV,MAAAA,SAAS,EAAG;AAAd,KAAd;A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AL,CAAWlB,YAAX,CAAwB,aAAxB,KAA0C,EAA1C,GAA+C,KAAKkB,KAAL,CAAWlB,YAAX,CAAwB,aAAxB,CAA/C,GAAwF,UANnJ,CAhBJ,CA5BJ,CADJ;AAuDD;;AA/L0C;;AAkM7C,MAAMmF,MAAM,GAAGkB,wBAAWC,MAAX,CAAkB;AAC7BlB,EAAAA,IAAI,EAAE;AACFvB,IAAAA,eAAe,EAAE,OADf;AAEF0C,IAAAA,SAAS,EAAE,CAFT;AAGF5C,IAAAA,MAAM,EAAE,GAHN;AAIFC,IAAAA,KAAK,EAAE,KAJL;AAKFY,IAAAA,UAAU,EAAE,QALV;AAMFV,IAAAA,YAAY,EAAE;AANZ,GADuB;AAS7B4B,EAAAA,aAAa,EAAE;AAAE/B,IAAAA,MAAM,EAAE,EAAV;AAAaL,IAAAA,aAAa,EAAE,KAA5B;AAAkCiB,IAAAA,cAAc,EAAE,QAAlD;AAA2DX,IAAAA,KAAK,EAAC,MAAjE;AAAwEY,IAAAA,UAAU,EAAC,QAAnF;AAA4FC,IAAAA,YAAY,EAAC,QAAzG;AAAkHZ,IAAAA,eAAe,EAAE;AAAnI,GATc;AAU7B+B,EAAAA,MAAM,EAAE;AAAE/B,IAAAA,eAAe,EAAE,SAAnB;AAA8BF,IAAAA,MAAM,EAAE,EAAtC;AAA0CG,IAAAA,YAAY,EAAE,CAAxD;AAA2DS,IAAAA,cAAc,EAAE;AAA3E;AAVqB,CAAlB,CAAf;;eAae1E,oB","sourcesContent":["// @ts-nocheck\nimport React, { Component } from \"react\";\nimport { View, Text, TouchableOpacity,StyleSheet,Image, VirtualizedList, Platform, ToastAndroid, Alert, Linking, NativeModules } from \"react-native\";\nconst { Flyy } = NativeModules;\n\nclass FlyyCheckinComponent extends Component {\n\n state = {\n mileStoneData: [],\n checkinOffer: [],\n listItems: [],\n persons: [1,2,3,4,5],\n partnerId: \"\",\n userId: \"\",\n appData: \"\",\n environment: 0\n };\n\n async componentDidMount(){\n try {\n const data = await Flyy.getUserData();\n const appData = await Flyy.getAppData();\n this.setState({ \n partnerId : data[\"partner_id\"],\n userId : data[\"user_id\"],\n environment : data[\"environment\"],\n appData: appData\n })\n } catch (e) {\n console.error(e);\n }\n\n await this.fetchData();\n }\n\n\n async fetchData(){\n this.setState({ listItems : []})\n const resp = await fetch(`https://${this.state.environment == 0 ? \"ghc-stage\" : \"ghc\"}.theflyy.com/api/v7/flyy_app_info`, {\n headers: {\n \"X-Key\": this.state.partnerId,\n \"Content-Type\": \"application/json\",\n \"X-App-Data\": this.state.appData\n }\n });\n const data = await resp.json();\n for (var key in data.info.offers) {\n if (data.info.offers[key].offer_type_code === \"checkin\") {\n this.setState({ checkinOffer : data.info.offers[key] })\n this.setState({ mileStoneData : data.info.offers[key].milestones })\n break;\n }\n }\n var tempData = [];\n var isRewardDay = false;\n var isCheckedIn = false;\n for (let i = 0; i < this.state.checkinOffer.total_streak; i++) {\n for (let j = 0; j < this.state.mileStoneData.length; j++) {\n if (i + 1 === parseInt(this.state.mileStoneData[j].value)) {\n isRewardDay = true;\n }\n }\n if (i+1 <= this.state.checkinOffer.streak) {\n isCheckedIn = true;\n }\n tempData.push({ \"isRewardDay\": isRewardDay, \"isCheckedIn\": isCheckedIn })\n isRewardDay = false;\n isCheckedIn = false;\n }\n this.setState({ listItems : tempData })\n }\n\n\n async checkInApi() {\n var url = `https://${this.state.environment == 0 ? \"ghc-stage\" : \"ghc\"}.theflyy.com/api/v1/checkin?offer_id=` + this.state.checkinOffer.id.toString();\n const resp = await fetch(url, {\n headers: {\n \"X-Key\": this.state.partnerId,\n \"Content-Type\": \"application/json\",\n \"X-App-Data\": this.state.appData\n }\n });\n const data = await resp.json();\n if (data.success) {\n this.fetchData()\n } else {\n this.notifyMessage(data.message)\n }\n }\n\n notifyMessage(msg:string) {\n if (Platform.OS === 'android') {\n ToastAndroid.show(msg, ToastAndroid.SHORT)\n } else {\n // Toast.showWithGravity(msg, Toast.SHORT, Toast.BOTTOM);\n }\n }\n\n render() {\n const Divider = ({color = \"black\",index}:{color:any,index:any}) => {\n return (\n <View style={{ flexDirection: 'row'}}>\n {React.Children.toArray(\n this.state.persons.map(() => {\n return (\n <View style={{ flexDirection: 'row' }}>\n <View style={{ height: 1, width: 2, backgroundColor: color, borderRadius: 2 }} />\n <View style={{ width: 1, backgroundColor: \"white\", borderRadius: 2 }} />\n </View>\n );\n })\n )}\n </View>\n )\n }\n const getItemCount = () => this.state.listItems.length;\n const getItem = (data:any, index:any) => ({\n id: Math.random().toString(12).substring(0),\n isRewardDay: data[index].isRewardDay,\n isCheckedIn: data[index].isCheckedIn,\n index: index\n });\n const Item = ({ title, index }: {title:any,index:any}) => {\n const day = index + 1;\n return (\n <View style = {{justifyContent: \"center\",alignItems:'center',alignContent:'center'}}>\n <View style = {{flexDirection : 'row',height: 35,justifyContent:'center',alignItems:'center'}}>\n {title.isCheckedIn? <View style={{ height: 1, width: 15, alignSelf: \"center\" , backgroundColor: index == 0 ? \"white\" : \"black\"}} />:<Divider color={index == 0 ? \"white\" : \"black\"} index={index}/>}\n {title.isRewardDay ?\n title.isCheckedIn ? <Image source={require('./assets/images/reward_flyy.png')} style={{ height: 20, width: 15 }} /> : <Image source={{ uri: this.state.checkinOffer[\"currency_icon_url\"] }} style={{ height: 20, width: 20 }} />\n : title.isCheckedIn ?\n <View style = {{height:17,width:17,backgroundColor:\"black\",borderRadius:15,justifyContent:'center',alignItems:'center'}}><Text style={{color:\"white\",fontSize:10}}>✓</Text></View>\n : <Image source={require('./assets/images/radio.png')} style={{ height: 20, width: 20 }} />}\n {index != this.state.listItems.length-1 ? this.state.listItems[index+1].isCheckedIn ? <View style={{ height: 1, width: 15, alignSelf: \"center\" , backgroundColor: index == this.state.listItems.length-1 ? \"white\" : \"black\"}} />:<Divider color={index == this.state.listItems.length - 1 ? \"white\" : \"black\"} index={index}/>: <View style = {{width:15}}/>}\n </View>\n <Text style = {{textAlign: 'center',color: title.isRewardDay ? this.props.style?.checkInEarnColor ?? \"black\" : this.props.style?.checkInDaysColor ?? \"black\"}}>{title.isRewardDay ?\n title.isCheckedIn ? \"Won\" : \"Earn\"\n : title.isCheckedIn ? \"Day \"+day : \"Day \"+day}</Text>\n </View>\n )\n }\n return (\n <TouchableOpacity style={styles.main} onPress = {()=>{\n Flyy.openFlyyCheckinPage();\n }}>\n <View style={{ height: 10 }} />\n <Text style={{ fontSize: 20, color: this.props.style?.checkInTitleColor ?? \"black\", fontFamily: this.props.style?.fontFamily ?? \"Montserrat-Regular\" }}>\n {this.state.checkinOffer[\"offer_type_title\"] ?? \"N/A\"}\n </Text>\n <View style={{ height: 10 }} />\n <View style = {{flexDirection: 'row',width:250,justifyContent: 'center'}}>\n <Text numberOfLines={1} style={{ fontSize: 18, color: this.props.style?.checkInDescriptionColor ?? \"grey\", fontFamily: this.props.style?.fontFamily ?? \"Montserrat-Regular\",textAlign: \"center\"}}>\n {this.state.checkinOffer[\"description\"] != null ? this.state.checkinOffer[\"description\"].replace(/(<([^>]+)>)/ig, '') : \"N/A\"}\n </Text>\n </View>\n <View style={{ height: 10 }} />\n <View style={styles.listContainer}>\n <View>\n <VirtualizedList\n data={this.state.listItems}\n style = {{alignSelf: \"center\"}}\n initialNumToRender={4}\n horizontal={true}\n renderItem={({ item, index }) => <Item title={item} index={index} />}\n getItemCount={getItemCount}\n getItem={getItem}\n />\n </View>\n </View>\n <View style={{ height: 10 }} />\n <TouchableOpacity\n style={styles.button}\n onPress={async () => {\n const eventId = this.state.checkinOffer[\"event_id\"];\n const url = this.state.checkinOffer[\"deeplink\"];\n if(eventId != null){\n if (url != \"\") {\n const supported = await Linking.canOpenURL(url);\n if (supported) {\n await Linking.openURL(url);\n }\n }\n }else{\n this.checkInApi();\n }\n }}>\n <Text style={{\n fontSize: 20,\n color: this.props.style?.checkInBtnTextColor ?? \"white\",\n paddingLeft: 10, \n paddingRight: 10,\n fontFamily: \"Montserrat-Regular\"\n }}>{this.state.checkinOffer[\"checked_in\"] ? \"Checked In\" : this.state.checkinOffer[\"button_text\"] != \"\" ? this.state.checkinOffer[\"button_text\"] : \"Check In\"}</Text>\n </TouchableOpacity>\n </TouchableOpacity>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n main: {\n backgroundColor: \"white\",\n elevation: 5,\n height: 210,\n width: \"90%\",\n alignItems: \"center\",\n borderRadius: 10\n },\n listContainer: { height: 60,flexDirection: \"row\",justifyContent: \"center\",width:\"100%\",alignItems:'center',alignContent:'center',backgroundColor: \"white\"},\n button: { backgroundColor: \"#f57242\", height: 35, borderRadius: 5, justifyContent: \"center\" },\n});\n\nexport default FlyyCheckinComponent;"]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_defineProperty","obj","key","value","_toPropertyKey","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","Flyy","NativeModules","FlyyCheckinComponent","Component","constructor","args","mileStoneData","checkinOffer","listItems","persons","partnerId","userId","appData","environment","componentDidMount","data","getUserData","getAppData","setState","console","error","fetchData","resp","fetch","state","headers","json","info","offers","offer_type_code","milestones","tempData","isRewardDay","isCheckedIn","total_streak","j","length","parseInt","streak","push","checkInApi","url","id","toString","success","notifyMessage","message","msg","Platform","OS","ToastAndroid","show","SHORT","render","_this$props$style$che3","_this$props$style3","_this$props$style$fon","_this$props$style4","_this$state$checkinOf","_this$props$style$che4","_this$props$style5","_this$props$style$fon2","_this$props$style6","_this$props$style$che5","_this$props$style7","Divider","color","index","createElement","View","style","flexDirection","React","Children","toArray","map","height","width","backgroundColor","borderRadius","getItemCount","getItem","Math","random","substring","Item","title","_this$props$style$che","_this$props$style","_this$props$style$che2","_this$props$style2","day","justifyContent","alignItems","alignContent","alignSelf","Image","source","uri","Text","fontSize","textAlign","props","checkInEarnColor","checkInDaysColor","TouchableOpacity","styles","main","onPress","openFlyyCheckinPage","checkInTitleColor","fontFamily","numberOfLines","checkInDescriptionColor","replace","listContainer","VirtualizedList","initialNumToRender","horizontal","renderItem","item","button","eventId","supported","Linking","canOpenURL","openURL","checkInBtnTextColor","paddingLeft","paddingRight","StyleSheet","create","elevation","_default","exports"],"sources":["flyy_checkin_view.tsx"],"sourcesContent":["// @ts-nocheck\nimport React, { Component } from \"react\";\nimport { View, Text, TouchableOpacity,StyleSheet,Image, VirtualizedList, Platform, ToastAndroid, Alert, Linking, NativeModules } from \"react-native\";\nconst { Flyy } = NativeModules;\n\nclass FlyyCheckinComponent extends Component {\n\n state = {\n mileStoneData: [],\n checkinOffer: [],\n listItems: [],\n persons: [1,2,3,4,5],\n partnerId: \"\",\n userId: \"\",\n appData: \"\",\n environment: 0\n };\n\n async componentDidMount(){\n try {\n const data = await Flyy.getUserData();\n const appData = await Flyy.getAppData();\n this.setState({ \n partnerId : data[\"partner_id\"],\n userId : data[\"user_id\"],\n environment : data[\"environment\"],\n appData: appData\n })\n } catch (e) {\n console.error(e);\n }\n\n await this.fetchData();\n }\n\n\n async fetchData(){\n this.setState({ listItems : []})\n const resp = await fetch(`https://${this.state.environment == 0 ? \"ghc-stage\" : \"ghc\"}.theflyy.com/api/v7/flyy_app_info`, {\n headers: {\n \"X-Key\": this.state.partnerId,\n \"Content-Type\": \"application/json\",\n \"X-App-Data\": this.state.appData\n }\n });\n const data = await resp.json();\n for (var key in data.info.offers) {\n if (data.info.offers[key].offer_type_code === \"checkin\") {\n this.setState({ checkinOffer : data.info.offers[key] })\n this.setState({ mileStoneData : data.info.offers[key].milestones })\n break;\n }\n }\n var tempData = [];\n var isRewardDay = false;\n var isCheckedIn = false;\n for (let i = 0; i < this.state.checkinOffer.total_streak; i++) {\n for (let j = 0; j < this.state.mileStoneData.length; j++) {\n if (i + 1 === parseInt(this.state.mileStoneData[j].value)) {\n isRewardDay = true;\n }\n }\n if (i+1 <= this.state.checkinOffer.streak) {\n isCheckedIn = true;\n }\n tempData.push({ \"isRewardDay\": isRewardDay, \"isCheckedIn\": isCheckedIn })\n isRewardDay = false;\n isCheckedIn = false;\n }\n this.setState({ listItems : tempData })\n }\n\n\n async checkInApi() {\n var url = `https://${this.state.environment == 0 ? \"ghc-stage\" : \"ghc\"}.theflyy.com/api/v1/checkin?offer_id=` + this.state.checkinOffer.id.toString();\n const resp = await fetch(url, {\n headers: {\n \"X-Key\": this.state.partnerId,\n \"Content-Type\": \"application/json\",\n \"X-App-Data\": this.state.appData\n }\n });\n const data = await resp.json();\n if (data.success) {\n this.fetchData()\n } else {\n this.notifyMessage(data.message)\n }\n }\n\n notifyMessage(msg:string) {\n if (Platform.OS === 'android') {\n ToastAndroid.show(msg, ToastAndroid.SHORT)\n } else {\n // Toast.showWithGravity(msg, Toast.SHORT, Toast.BOTTOM);\n }\n }\n\n render() {\n const Divider = ({color = \"black\",index}:{color:any,index:any}) => {\n return (\n <View style={{ flexDirection: 'row'}}>\n {React.Children.toArray(\n this.state.persons.map(() => {\n return (\n <View style={{ flexDirection: 'row' }}>\n <View style={{ height: 1, width: 2, backgroundColor: color, borderRadius: 2 }} />\n <View style={{ width: 1, backgroundColor: \"white\", borderRadius: 2 }} />\n </View>\n );\n })\n )}\n </View>\n )\n }\n const getItemCount = () => this.state.listItems.length;\n const getItem = (data:any, index:any) => ({\n id: Math.random().toString(12).substring(0),\n isRewardDay: data[index].isRewardDay,\n isCheckedIn: data[index].isCheckedIn,\n index: index\n });\n const Item = ({ title, index }: {title:any,index:any}) => {\n const day = index + 1;\n return (\n <View style = {{justifyContent: \"center\",alignItems:'center',alignContent:'center'}}>\n <View style = {{flexDirection : 'row',height: 35,justifyContent:'center',alignItems:'center'}}>\n {title.isCheckedIn? <View style={{ height: 1, width: 15, alignSelf: \"center\" , backgroundColor: index == 0 ? \"white\" : \"black\"}} />:<Divider color={index == 0 ? \"white\" : \"black\"} index={index}/>}\n {title.isRewardDay ?\n title.isCheckedIn ? <Image source={require('./assets/images/reward_flyy.png')} style={{ height: 20, width: 15 }} /> : <Image source={{ uri: this.state.checkinOffer[\"currency_icon_url\"] }} style={{ height: 20, width: 20 }} />\n : title.isCheckedIn ?\n <View style = {{height:17,width:17,backgroundColor:\"black\",borderRadius:15,justifyContent:'center',alignItems:'center'}}><Text style={{color:\"white\",fontSize:10}}>✓</Text></View>\n : <Image source={require('./assets/images/radio.png')} style={{ height: 20, width: 20 }} />}\n {index != this.state.listItems.length-1 ? this.state.listItems[index+1].isCheckedIn ? <View style={{ height: 1, width: 15, alignSelf: \"center\" , backgroundColor: index == this.state.listItems.length-1 ? \"white\" : \"black\"}} />:<Divider color={index == this.state.listItems.length - 1 ? \"white\" : \"black\"} index={index}/>: <View style = {{width:15}}/>}\n </View>\n <Text style = {{textAlign: 'center',color: title.isRewardDay ? this.props.style?.checkInEarnColor ?? \"black\" : this.props.style?.checkInDaysColor ?? \"black\"}}>{title.isRewardDay ?\n title.isCheckedIn ? \"Won\" : \"Earn\"\n : title.isCheckedIn ? \"Day \"+day : \"Day \"+day}</Text>\n </View>\n )\n }\n return (\n <TouchableOpacity style={styles.main} onPress = {()=>{\n Flyy.openFlyyCheckinPage();\n }}>\n <View style={{ height: 10 }} />\n <Text style={{ fontSize: 20, color: this.props.style?.checkInTitleColor ?? \"black\", fontFamily: this.props.style?.fontFamily ?? \"Montserrat-Regular\" }}>\n {this.state.checkinOffer[\"offer_type_title\"] ?? \"N/A\"}\n </Text>\n <View style={{ height: 10 }} />\n <View style = {{flexDirection: 'row',width:250,justifyContent: 'center'}}>\n <Text numberOfLines={1} style={{ fontSize: 18, color: this.props.style?.checkInDescriptionColor ?? \"grey\", fontFamily: this.props.style?.fontFamily ?? \"Montserrat-Regular\",textAlign: \"center\"}}>\n {this.state.checkinOffer[\"description\"] != null ? this.state.checkinOffer[\"description\"].replace(/(<([^>]+)>)/ig, '') : \"N/A\"}\n </Text>\n </View>\n <View style={{ height: 10 }} />\n <View style={styles.listContainer}>\n <View>\n <VirtualizedList\n data={this.state.listItems}\n style = {{alignSelf: \"center\"}}\n initialNumToRender={4}\n horizontal={true}\n renderItem={({ item, index }) => <Item title={item} index={index} />}\n getItemCount={getItemCount}\n getItem={getItem}\n />\n </View>\n </View>\n <View style={{ height: 10 }} />\n <TouchableOpacity\n style={styles.button}\n onPress={async () => {\n const eventId = this.state.checkinOffer[\"event_id\"];\n const url = this.state.checkinOffer[\"deeplink\"];\n if(eventId != null){\n if (url != \"\") {\n const supported = await Linking.canOpenURL(url);\n if (supported) {\n await Linking.openURL(url);\n }\n }\n }else{\n this.checkInApi();\n }\n }}>\n <Text style={{\n fontSize: 20,\n color: this.props.style?.checkInBtnTextColor ?? \"white\",\n paddingLeft: 10, \n paddingRight: 10,\n fontFamily: \"Montserrat-Regular\"\n }}>{this.state.checkinOffer[\"checked_in\"] ? \"Checked In\" : this.state.checkinOffer[\"button_text\"] != \"\" ? this.state.checkinOffer[\"button_text\"] : \"Check In\"}</Text>\n </TouchableOpacity>\n </TouchableOpacity>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n main: {\n backgroundColor: \"white\",\n elevation: 5,\n height: 210,\n width: \"90%\",\n alignItems: \"center\",\n borderRadius: 10\n },\n listContainer: { height: 60,flexDirection: \"row\",justifyContent: \"center\",width:\"100%\",alignItems:'center',alignContent:'center',backgroundColor: \"white\"},\n button: { backgroundColor: \"#f57242\", height: 35, borderRadius: 5, justifyContent: \"center\" },\n});\n\nexport default FlyyCheckinComponent;"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAqJ,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,C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