react-native-flyy 1.4.19 → 1.4.22

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 (84) hide show
  1. package/android/.gradle/6.5/executionHistory/executionHistory.lock +0 -0
  2. package/android/.gradle/{6.3 → 6.5}/fileChanges/last-build.bin +0 -0
  3. package/android/.gradle/{6.3/fileHashes/resourceHashesCache.bin → 6.5/fileHashes/fileHashes.bin} +0 -0
  4. package/android/.gradle/6.5/fileHashes/fileHashes.lock +0 -0
  5. package/android/.gradle/{6.3 → 6.5}/gc.properties +0 -0
  6. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  7. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  8. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  9. package/android/.gradle/checksums/checksums.lock +0 -0
  10. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  11. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  12. package/android/.idea/libraries/Gradle__androidx_activity_activity_1_2_4_aar.xml +4 -3
  13. package/android/.idea/libraries/Gradle__androidx_annotation_annotation_experimental_1_1_0_aar.xml +3 -3
  14. package/android/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_4_2_aar.xml +4 -4
  15. package/android/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_4_2_aar.xml +3 -3
  16. package/android/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_1_0_aar.xml +3 -2
  17. package/android/.idea/libraries/Gradle__androidx_autofill_autofill_1_1_0_aar.xml +4 -4
  18. package/android/.idea/libraries/Gradle__androidx_core_core_1_7_0_aar.xml +4 -4
  19. package/android/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml +3 -2
  20. package/android/.idea/libraries/Gradle__androidx_customview_customview_1_1_0_aar.xml +3 -2
  21. package/android/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_1_1_aar.xml +4 -4
  22. package/android/.idea/libraries/Gradle__androidx_fragment_fragment_1_3_6_aar.xml +4 -4
  23. package/android/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml +3 -2
  24. package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_1_0_aar.xml +3 -2
  25. package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_3_1_aar.xml +3 -2
  26. package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_4_0_aar.xml +3 -3
  27. package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_3_1_aar.xml +3 -3
  28. package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_savedstate_2_3_1_aar.xml +3 -2
  29. package/android/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml +3 -2
  30. package/android/.idea/libraries/Gradle__androidx_multidex_multidex_2_0_0_aar.xml +3 -2
  31. package/android/.idea/libraries/Gradle__androidx_multidex_multidex_instrumentation_2_0_0_aar.xml +11 -0
  32. package/android/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_1_0_aar.xml +3 -3
  33. package/android/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml +4 -3
  34. package/android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml +3 -2
  35. package/android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml +3 -2
  36. package/android/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_1_aar.xml +3 -2
  37. package/android/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml +3 -2
  38. package/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_2_5_0_aar.xml +3 -3
  39. package/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_2_5_0_aar.xml +4 -3
  40. package/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_2_5_0_aar.xml +4 -3
  41. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_2_5_0_aar.xml +4 -3
  42. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_base_2_5_0_aar.xml +4 -3
  43. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_native_2_5_0_aar.xml +3 -2
  44. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp3_2_5_0_aar.xml +3 -2
  45. package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_ashmem_2_5_0_aar.xml +3 -2
  46. package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_java_2_5_0_aar.xml +3 -2
  47. package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_native_2_5_0_aar.xml +3 -2
  48. package/android/.idea/libraries/Gradle__com_facebook_fresco_nativeimagefilters_2_5_0_aar.xml +3 -2
  49. package/android/.idea/libraries/Gradle__com_facebook_fresco_nativeimagetranscoder_2_5_0_aar.xml +3 -2
  50. package/android/.idea/libraries/Gradle__com_facebook_fresco_ui_common_2_5_0_aar.xml +3 -2
  51. package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_68_1_aar.xml +4 -4
  52. package/android/.idea/libraries/Gradle__com_facebook_soloader_soloader_0_10_3_aar.xml +3 -2
  53. package/android/.idea/libraries/{Gradle__com_github_roid_software_flyy_sdk_1_4_51.xml → Gradle__com_github_roid_software_flyy_sdk_1_4_53.xml} +2 -2
  54. package/android/.idea/libraries/{Gradle__com_github_roid_software_flyy_sdk_flyy_1_4_51_aar.xml → Gradle__com_github_roid_software_flyy_sdk_flyy_1_4_53_aar.xml} +4 -4
  55. package/android/.idea/libraries/{Gradle__com_github_roid_software_flyy_sdk_scratchoff_1_4_51_aar.xml → Gradle__com_github_roid_software_flyy_sdk_scratchoff_1_4_53_aar.xml} +4 -4
  56. package/android/.idea/modules/android.iml +12 -8
  57. package/android/build.gradle +1 -1
  58. package/android/src/main/assets/fonts/Montserrat-Bold.ttf +0 -0
  59. package/lib/commonjs/assets/images/offerswidget.png +0 -0
  60. package/lib/commonjs/assets/images/rewardwidget.png +0 -0
  61. package/lib/commonjs/assets/images/walletwidget.png +0 -0
  62. package/lib/commonjs/index.js +144 -1
  63. package/lib/commonjs/index.js.map +1 -1
  64. package/lib/module/assets/images/offerswidget.png +0 -0
  65. package/lib/module/assets/images/rewardwidget.png +0 -0
  66. package/lib/module/assets/images/walletwidget.png +0 -0
  67. package/lib/module/index.js +137 -1
  68. package/lib/module/index.js.map +1 -1
  69. package/lib/typescript/index.d.ts +21 -0
  70. package/package.json +1 -1
  71. package/react-native-flyy.podspec +1 -1
  72. package/src/assets/images/offerswidget.png +0 -0
  73. package/src/assets/images/rewardwidget.png +0 -0
  74. package/src/assets/images/walletwidget.png +0 -0
  75. package/src/index.tsx +144 -1
  76. package/android/.gradle/6.3/executionHistory/executionHistory.bin +0 -0
  77. package/android/.gradle/6.3/executionHistory/executionHistory.lock +0 -0
  78. package/android/.gradle/6.3/fileContent/fileContent.lock +0 -0
  79. package/android/.gradle/6.3/fileHashes/fileHashes.bin +0 -0
  80. package/android/.gradle/6.3/fileHashes/fileHashes.lock +0 -0
  81. package/android/.gradle/6.3/javaCompile/classAnalysis.bin +0 -0
  82. package/android/.gradle/6.3/javaCompile/jarAnalysis.bin +0 -0
  83. package/android/.gradle/6.3/javaCompile/javaCompile.lock +0 -0
  84. package/android/.gradle/6.3/javaCompile/taskHistory.bin +0 -0
@@ -1,6 +1,142 @@
1
- import { NativeModules } from 'react-native';
1
+ import React from 'react';
2
+ import { Image, NativeModules, Text, TouchableOpacity, View } from 'react-native';
2
3
  const {
3
4
  Flyy
4
5
  } = NativeModules;
5
6
  export default Flyy;
7
+ export const FlyyWidget = ({
8
+ widgetStyle = {
9
+ rewardsButtonIcon: require('./assets/images/rewardwidget.png'),
10
+ offersButtonIcon: require('./assets/images/offerswidget.png'),
11
+ walletButtonIcon: require('./assets/images/walletwidget.png'),
12
+ rewardButtonTitle: 'Rewards',
13
+ offerButtonTitle: 'Offers',
14
+ walletButtonTitle: 'Wallet',
15
+ buttonTitleFontFamily: 'Montserrat-Bold',
16
+ buttonBorderWidth: 0.5,
17
+ buttonTitleTextSize: 16.0,
18
+ iconCornerRadius: 30.0,
19
+ buttonCornerRadius: 15.0,
20
+ buttonTitleTextColor: 'black',
21
+ buttonBorderColor: 'white',
22
+ containerBackgroundColor: '#ebedeb',
23
+ buttonIconBackgroundColor: '#654EA3',
24
+ buttonBackgroundColor: 'white'
25
+ }
26
+ }) => {
27
+ var _widgetStyle$buttonBa, _widgetStyle$buttonCo, _widgetStyle$buttonBo, _widgetStyle$buttonBo2, _widgetStyle$containe, _widgetStyle$offerBut, _widgetStyle$offersBu, _widgetStyle$rewardBu, _widgetStyle$rewardsB, _widgetStyle$walletBu, _widgetStyle$walletBu2;
28
+
29
+ const buttonStyle = {
30
+ backgroundColor: (_widgetStyle$buttonBa = widgetStyle.buttonBackgroundColor) !== null && _widgetStyle$buttonBa !== void 0 ? _widgetStyle$buttonBa : 'white',
31
+ height: 110,
32
+ flex: 1,
33
+ elevation: 1,
34
+ borderRadius: (_widgetStyle$buttonCo = widgetStyle.buttonCornerRadius) !== null && _widgetStyle$buttonCo !== void 0 ? _widgetStyle$buttonCo : 15.0,
35
+ borderColor: (_widgetStyle$buttonBo = widgetStyle.buttonBorderColor) !== null && _widgetStyle$buttonBo !== void 0 ? _widgetStyle$buttonBo : 'white',
36
+ borderWidth: (_widgetStyle$buttonBo2 = widgetStyle.buttonBorderWidth) !== null && _widgetStyle$buttonBo2 !== void 0 ? _widgetStyle$buttonBo2 : 0.5
37
+ };
38
+ return /*#__PURE__*/React.createElement(View, {
39
+ style: {
40
+ backgroundColor: (_widgetStyle$containe = widgetStyle.containerBackgroundColor) !== null && _widgetStyle$containe !== void 0 ? _widgetStyle$containe : '#ebedeb',
41
+ height: 160,
42
+ width: '100%',
43
+ flexDirection: 'row',
44
+ justifyContent: 'center',
45
+ alignItems: 'center'
46
+ }
47
+ }, /*#__PURE__*/React.createElement(View, {
48
+ style: {
49
+ width: 20
50
+ }
51
+ }), /*#__PURE__*/React.createElement(TouchableOpacity, {
52
+ onPress: () => {
53
+ Flyy.openOffersScreen();
54
+ },
55
+ style: buttonStyle
56
+ }, /*#__PURE__*/React.createElement(FlyyCardView, {
57
+ cardStyle: widgetStyle,
58
+ buttonTitle: (_widgetStyle$offerBut = widgetStyle.offerButtonTitle) !== null && _widgetStyle$offerBut !== void 0 ? _widgetStyle$offerBut : 'Offers',
59
+ buttonIcon: (_widgetStyle$offersBu = widgetStyle.offersButtonIcon) !== null && _widgetStyle$offersBu !== void 0 ? _widgetStyle$offersBu : require('./assets/images/offerswidget.png')
60
+ })), /*#__PURE__*/React.createElement(View, {
61
+ style: {
62
+ width: 15
63
+ }
64
+ }), /*#__PURE__*/React.createElement(TouchableOpacity, {
65
+ onPress: () => {
66
+ Flyy.openRewardsScreen();
67
+ },
68
+ style: buttonStyle
69
+ }, /*#__PURE__*/React.createElement(FlyyCardView, {
70
+ cardStyle: widgetStyle,
71
+ buttonTitle: (_widgetStyle$rewardBu = widgetStyle.rewardButtonTitle) !== null && _widgetStyle$rewardBu !== void 0 ? _widgetStyle$rewardBu : 'Rewards',
72
+ buttonIcon: (_widgetStyle$rewardsB = widgetStyle.rewardsButtonIcon) !== null && _widgetStyle$rewardsB !== void 0 ? _widgetStyle$rewardsB : require('./assets/images/rewardwidget.png')
73
+ })), /*#__PURE__*/React.createElement(View, {
74
+ style: {
75
+ width: 15
76
+ }
77
+ }), /*#__PURE__*/React.createElement(TouchableOpacity, {
78
+ onPress: () => {
79
+ Flyy.openWalletScreen();
80
+ },
81
+ style: buttonStyle
82
+ }, /*#__PURE__*/React.createElement(FlyyCardView, {
83
+ cardStyle: widgetStyle,
84
+ buttonTitle: (_widgetStyle$walletBu = widgetStyle.walletButtonTitle) !== null && _widgetStyle$walletBu !== void 0 ? _widgetStyle$walletBu : 'Wallet',
85
+ buttonIcon: (_widgetStyle$walletBu2 = widgetStyle.walletButtonIcon) !== null && _widgetStyle$walletBu2 !== void 0 ? _widgetStyle$walletBu2 : require('./assets/images/walletwidget.png')
86
+ })), /*#__PURE__*/React.createElement(View, {
87
+ style: {
88
+ width: 20
89
+ }
90
+ }));
91
+ }; // @ts-ignore
92
+
93
+ const FlyyCardView = ({
94
+ cardStyle,
95
+ buttonTitle,
96
+ buttonIcon
97
+ }) => {
98
+ var _cardStyle$buttonIcon, _cardStyle$iconCorner, _cardStyle$buttonTitl, _cardStyle$buttonTitl2;
99
+
100
+ return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
101
+ style: {
102
+ height: 10
103
+ }
104
+ }), /*#__PURE__*/React.createElement(View, {
105
+ style: {
106
+ backgroundColor: (_cardStyle$buttonIcon = cardStyle.buttonIconBackgroundColor) !== null && _cardStyle$buttonIcon !== void 0 ? _cardStyle$buttonIcon : '#654EA3',
107
+ height: 50,
108
+ width: 50,
109
+ borderRadius: (_cardStyle$iconCorner = cardStyle.iconCornerRadius) !== null && _cardStyle$iconCorner !== void 0 ? _cardStyle$iconCorner : 30.0,
110
+ alignSelf: 'center',
111
+ justifyContent: 'center',
112
+ alignItems: 'center'
113
+ }
114
+ }, /*#__PURE__*/React.createElement(Image, {
115
+ source: buttonIcon,
116
+ style: {
117
+ height: 28,
118
+ width: 28
119
+ }
120
+ })), /*#__PURE__*/React.createElement(View, {
121
+ style: {
122
+ height: 10
123
+ }
124
+ }), /*#__PURE__*/React.createElement(Text, {
125
+ style: {
126
+ alignSelf: 'center',
127
+ flexShrink: 1,
128
+ color: (_cardStyle$buttonTitl = cardStyle.buttonTitleTextColor) !== null && _cardStyle$buttonTitl !== void 0 ? _cardStyle$buttonTitl : 'black',
129
+ fontSize: cardStyle.buttonTitleTextSize != null ? cardStyle.buttonTitleTextSize < 30 ? cardStyle.buttonTitleTextSize : 30 : 16,
130
+ fontFamily: (_cardStyle$buttonTitl2 = cardStyle.buttonTitleFontFamily) !== null && _cardStyle$buttonTitl2 !== void 0 ? _cardStyle$buttonTitl2 : 'Montserrat-Bold',
131
+ textAlign: 'center',
132
+ paddingLeft: 5,
133
+ paddingRight: 5
134
+ },
135
+ numberOfLines: 1
136
+ }, buttonTitle), /*#__PURE__*/React.createElement(View, {
137
+ style: {
138
+ height: 10
139
+ }
140
+ }));
141
+ };
6
142
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":["NativeModules","Flyy"],"mappings":"AAAA,SAASA,aAAT,QAA8B,cAA9B;AAMA,MAAM;AAAEC,EAAAA;AAAF,IAAWD,aAAjB;AAEA,eAAeC,IAAf","sourcesContent":["import { NativeModules } from 'react-native';\n\ntype FlyyType = {\n multiply(a: number, b: number): Promise<number>;\n};\n\nconst { Flyy } = NativeModules;\n\nexport default Flyy as FlyyType;\n"]}
1
+ {"version":3,"sources":["index.tsx"],"names":["React","Image","NativeModules","Text","TouchableOpacity","View","Flyy","FlyyWidget","widgetStyle","rewardsButtonIcon","require","offersButtonIcon","walletButtonIcon","rewardButtonTitle","offerButtonTitle","walletButtonTitle","buttonTitleFontFamily","buttonBorderWidth","buttonTitleTextSize","iconCornerRadius","buttonCornerRadius","buttonTitleTextColor","buttonBorderColor","containerBackgroundColor","buttonIconBackgroundColor","buttonBackgroundColor","buttonStyle","backgroundColor","height","flex","elevation","borderRadius","borderColor","borderWidth","width","flexDirection","justifyContent","alignItems","openOffersScreen","openRewardsScreen","openWalletScreen","FlyyCardView","cardStyle","buttonTitle","buttonIcon","alignSelf","flexShrink","color","fontSize","fontFamily","textAlign","paddingLeft","paddingRight"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,KADF,EAEEC,aAFF,EAGEC,IAHF,EAIEC,gBAJF,EAKEC,IALF,QAMO,cANP;AAYA,MAAM;AAAEC,EAAAA;AAAF,IAAWJ,aAAjB;AAEA,eAAeI,IAAf;AACA,OAAO,MAAMC,UAAU,GAAG,CAAC;AACzBC,EAAAA,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N,SAAS,CAACxB,mBAAV,IAAiC,IAAjC,GACIwB,SAAS,CAACxB,mBAAV,GAAgC,EAAhC,GACEwB,SAAS,CAACxB,mBADZ,GAEE,EAHN,GAII,EATD;AAUL+B,MAAAA,UAAU,4BAAEP,SAAS,CAAC1B,qBAAZ,2EAAqC,iBAV1C;AAWLkC,MAAAA,SAAS,EAAE,QAXN;AAYLC,MAAAA,WAAW,EAAE,CAZR;AAaLC,MAAAA,YAAY,EAAE;AAbT,KADT;AAgBE,IAAA,aAAa,EAAE;AAhBjB,KAkBGT,WAlBH,CAhBF,eAoCE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE;AAAEf,MAAAA,MAAM,EAAE;AAAV;AAAb,IApCF,CADF;AAwCD,CAzCD","sourcesContent":["import React from 'react';\nimport {\n Image,\n NativeModules,\n Text,\n TouchableOpacity,\n View,\n} from 'react-native';\n\ntype FlyyType = {\n multiply(a: number, b: number): Promise<number>;\n};\n\nconst { Flyy } = NativeModules;\n\nexport default Flyy as FlyyType;\nexport const FlyyWidget = ({\n widgetStyle = {\n rewardsButtonIcon: require('./assets/images/rewardwidget.png'),\n offersButtonIcon: require('./assets/images/offerswidget.png'),\n walletButtonIcon: require('./assets/images/walletwidget.png'),\n rewardButtonTitle: 'Rewards',\n offerButtonTitle: 'Offers',\n walletButtonTitle: 'Wallet',\n buttonTitleFontFamily: 'Montserrat-Bold',\n buttonBorderWidth: 0.5,\n buttonTitleTextSize: 16.0,\n iconCornerRadius: 30.0,\n buttonCornerRadius: 15.0,\n buttonTitleTextColor: 'black',\n buttonBorderColor: 'white',\n containerBackgroundColor: '#ebedeb',\n buttonIconBackgroundColor: '#654EA3',\n buttonBackgroundColor: 'white',\n },\n}) => {\n const buttonStyle = {\n backgroundColor: widgetStyle.buttonBackgroundColor ?? 'white',\n height: 110,\n flex: 1,\n elevation: 1,\n borderRadius: widgetStyle.buttonCornerRadius ?? 15.0,\n borderColor: widgetStyle.buttonBorderColor ?? 'white',\n borderWidth: widgetStyle.buttonBorderWidth ?? 0.5,\n };\n return (\n <View\n style={{\n backgroundColor: widgetStyle.containerBackgroundColor ?? '#ebedeb',\n height: 160,\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n }}\n >\n <View style={{ width: 20 }} />\n <TouchableOpacity\n onPress={() => {\n Flyy.openOffersScreen();\n }}\n style={buttonStyle}\n >\n <FlyyCardView\n cardStyle={widgetStyle}\n buttonTitle={widgetStyle.offerButtonTitle ?? 'Offers'}\n buttonIcon={\n widgetStyle.offersButtonIcon ??\n require('./assets/images/offerswidget.png')\n }\n />\n </TouchableOpacity>\n <View style={{ width: 15 }} />\n <TouchableOpacity\n onPress={() => {\n Flyy.openRewardsScreen();\n }}\n style={buttonStyle}\n >\n <FlyyCardView\n cardStyle={widgetStyle}\n buttonTitle={widgetStyle.rewardButtonTitle ?? 'Rewards'}\n buttonIcon={\n widgetStyle.rewardsButtonIcon ??\n require('./assets/images/rewardwidget.png')\n }\n />\n </TouchableOpacity>\n <View style={{ width: 15 }} />\n <TouchableOpacity\n onPress={() => {\n Flyy.openWalletScreen();\n }}\n style={buttonStyle}\n >\n <FlyyCardView\n cardStyle={widgetStyle}\n buttonTitle={widgetStyle.walletButtonTitle ?? 'Wallet'}\n buttonIcon={\n widgetStyle.walletButtonIcon ??\n require('./assets/images/walletwidget.png')\n }\n />\n </TouchableOpacity>\n <View style={{ width: 20 }} />\n </View>\n );\n};\n\n// @ts-ignore\nconst FlyyCardView = ({ cardStyle, buttonTitle, buttonIcon }) => {\n return (\n <View>\n <View style={{ height: 10 }} />\n <View\n style={{\n backgroundColor: cardStyle.buttonIconBackgroundColor ?? '#654EA3',\n height: 50,\n width: 50,\n borderRadius: cardStyle.iconCornerRadius ?? 30.0,\n alignSelf: 'center',\n justifyContent: 'center',\n alignItems: 'center',\n }}\n >\n <Image source={buttonIcon} style={{ height: 28, width: 28 }} />\n </View>\n <View style={{ height: 10 }} />\n <Text\n style={{\n alignSelf: 'center',\n flexShrink: 1,\n color: cardStyle.buttonTitleTextColor ?? 'black',\n fontSize:\n cardStyle.buttonTitleTextSize != null\n ? cardStyle.buttonTitleTextSize < 30\n ? cardStyle.buttonTitleTextSize\n : 30\n : 16,\n fontFamily: cardStyle.buttonTitleFontFamily ?? 'Montserrat-Bold',\n textAlign: 'center',\n paddingLeft: 5,\n paddingRight: 5,\n }}\n numberOfLines={1}\n >\n {buttonTitle}\n </Text>\n <View style={{ height: 10 }} />\n </View>\n );\n};\n"]}
@@ -1,5 +1,26 @@
1
+ /// <reference types="react" />
1
2
  declare type FlyyType = {
2
3
  multiply(a: number, b: number): Promise<number>;
3
4
  };
4
5
  declare const _default: FlyyType;
5
6
  export default _default;
7
+ export declare const FlyyWidget: ({ widgetStyle, }: {
8
+ widgetStyle?: {
9
+ rewardsButtonIcon: any;
10
+ offersButtonIcon: any;
11
+ walletButtonIcon: any;
12
+ rewardButtonTitle: string;
13
+ offerButtonTitle: string;
14
+ walletButtonTitle: string;
15
+ buttonTitleFontFamily: string;
16
+ buttonBorderWidth: number;
17
+ buttonTitleTextSize: number;
18
+ iconCornerRadius: number;
19
+ buttonCornerRadius: number;
20
+ buttonTitleTextColor: string;
21
+ buttonBorderColor: string;
22
+ containerBackgroundColor: string;
23
+ buttonIconBackgroundColor: string;
24
+ buttonBackgroundColor: string;
25
+ } | undefined;
26
+ }) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-flyy",
3
- "version": "1.4.19",
3
+ "version": "1.4.22",
4
4
  "description": "React Native wrapper around our Android and iOS mobile SDKs",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -18,5 +18,5 @@ Pod::Spec.new do |s|
18
18
 
19
19
 
20
20
  s.dependency "React-Core"
21
- s.dependency "FlyyFramework", "1.3.32"
21
+ s.dependency "FlyyFramework", "1.3.41"
22
22
  end
package/src/index.tsx CHANGED
@@ -1,4 +1,11 @@
1
- import { NativeModules } from 'react-native';
1
+ import React from 'react';
2
+ import {
3
+ Image,
4
+ NativeModules,
5
+ Text,
6
+ TouchableOpacity,
7
+ View,
8
+ } from 'react-native';
2
9
 
3
10
  type FlyyType = {
4
11
  multiply(a: number, b: number): Promise<number>;
@@ -7,3 +14,139 @@ type FlyyType = {
7
14
  const { Flyy } = NativeModules;
8
15
 
9
16
  export default Flyy as FlyyType;
17
+ export const FlyyWidget = ({
18
+ widgetStyle = {
19
+ rewardsButtonIcon: require('./assets/images/rewardwidget.png'),
20
+ offersButtonIcon: require('./assets/images/offerswidget.png'),
21
+ walletButtonIcon: require('./assets/images/walletwidget.png'),
22
+ rewardButtonTitle: 'Rewards',
23
+ offerButtonTitle: 'Offers',
24
+ walletButtonTitle: 'Wallet',
25
+ buttonTitleFontFamily: 'Montserrat-Bold',
26
+ buttonBorderWidth: 0.5,
27
+ buttonTitleTextSize: 16.0,
28
+ iconCornerRadius: 30.0,
29
+ buttonCornerRadius: 15.0,
30
+ buttonTitleTextColor: 'black',
31
+ buttonBorderColor: 'white',
32
+ containerBackgroundColor: '#ebedeb',
33
+ buttonIconBackgroundColor: '#654EA3',
34
+ buttonBackgroundColor: 'white',
35
+ },
36
+ }) => {
37
+ const buttonStyle = {
38
+ backgroundColor: widgetStyle.buttonBackgroundColor ?? 'white',
39
+ height: 110,
40
+ flex: 1,
41
+ elevation: 1,
42
+ borderRadius: widgetStyle.buttonCornerRadius ?? 15.0,
43
+ borderColor: widgetStyle.buttonBorderColor ?? 'white',
44
+ borderWidth: widgetStyle.buttonBorderWidth ?? 0.5,
45
+ };
46
+ return (
47
+ <View
48
+ style={{
49
+ backgroundColor: widgetStyle.containerBackgroundColor ?? '#ebedeb',
50
+ height: 160,
51
+ width: '100%',
52
+ flexDirection: 'row',
53
+ justifyContent: 'center',
54
+ alignItems: 'center',
55
+ }}
56
+ >
57
+ <View style={{ width: 20 }} />
58
+ <TouchableOpacity
59
+ onPress={() => {
60
+ Flyy.openOffersScreen();
61
+ }}
62
+ style={buttonStyle}
63
+ >
64
+ <FlyyCardView
65
+ cardStyle={widgetStyle}
66
+ buttonTitle={widgetStyle.offerButtonTitle ?? 'Offers'}
67
+ buttonIcon={
68
+ widgetStyle.offersButtonIcon ??
69
+ require('./assets/images/offerswidget.png')
70
+ }
71
+ />
72
+ </TouchableOpacity>
73
+ <View style={{ width: 15 }} />
74
+ <TouchableOpacity
75
+ onPress={() => {
76
+ Flyy.openRewardsScreen();
77
+ }}
78
+ style={buttonStyle}
79
+ >
80
+ <FlyyCardView
81
+ cardStyle={widgetStyle}
82
+ buttonTitle={widgetStyle.rewardButtonTitle ?? 'Rewards'}
83
+ buttonIcon={
84
+ widgetStyle.rewardsButtonIcon ??
85
+ require('./assets/images/rewardwidget.png')
86
+ }
87
+ />
88
+ </TouchableOpacity>
89
+ <View style={{ width: 15 }} />
90
+ <TouchableOpacity
91
+ onPress={() => {
92
+ Flyy.openWalletScreen();
93
+ }}
94
+ style={buttonStyle}
95
+ >
96
+ <FlyyCardView
97
+ cardStyle={widgetStyle}
98
+ buttonTitle={widgetStyle.walletButtonTitle ?? 'Wallet'}
99
+ buttonIcon={
100
+ widgetStyle.walletButtonIcon ??
101
+ require('./assets/images/walletwidget.png')
102
+ }
103
+ />
104
+ </TouchableOpacity>
105
+ <View style={{ width: 20 }} />
106
+ </View>
107
+ );
108
+ };
109
+
110
+ // @ts-ignore
111
+ const FlyyCardView = ({ cardStyle, buttonTitle, buttonIcon }) => {
112
+ return (
113
+ <View>
114
+ <View style={{ height: 10 }} />
115
+ <View
116
+ style={{
117
+ backgroundColor: cardStyle.buttonIconBackgroundColor ?? '#654EA3',
118
+ height: 50,
119
+ width: 50,
120
+ borderRadius: cardStyle.iconCornerRadius ?? 30.0,
121
+ alignSelf: 'center',
122
+ justifyContent: 'center',
123
+ alignItems: 'center',
124
+ }}
125
+ >
126
+ <Image source={buttonIcon} style={{ height: 28, width: 28 }} />
127
+ </View>
128
+ <View style={{ height: 10 }} />
129
+ <Text
130
+ style={{
131
+ alignSelf: 'center',
132
+ flexShrink: 1,
133
+ color: cardStyle.buttonTitleTextColor ?? 'black',
134
+ fontSize:
135
+ cardStyle.buttonTitleTextSize != null
136
+ ? cardStyle.buttonTitleTextSize < 30
137
+ ? cardStyle.buttonTitleTextSize
138
+ : 30
139
+ : 16,
140
+ fontFamily: cardStyle.buttonTitleFontFamily ?? 'Montserrat-Bold',
141
+ textAlign: 'center',
142
+ paddingLeft: 5,
143
+ paddingRight: 5,
144
+ }}
145
+ numberOfLines={1}
146
+ >
147
+ {buttonTitle}
148
+ </Text>
149
+ <View style={{ height: 10 }} />
150
+ </View>
151
+ );
152
+ };