react-native-stallion 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/README.md +36 -0
  2. package/android/build.gradle +100 -0
  3. package/android/gradle.properties +5 -0
  4. package/android/src/main/AndroidManifest.xml +8 -0
  5. package/android/src/main/java/com/stallion/Stallion.java +26 -0
  6. package/android/src/main/java/com/stallion/StallionConstants.java +27 -0
  7. package/android/src/main/java/com/stallion/StallionDefaultErrorActivity.java +27 -0
  8. package/android/src/main/java/com/stallion/StallionModule.java +250 -0
  9. package/android/src/main/java/com/stallion/StallionPackage.java +29 -0
  10. package/android/src/main/java/com/stallion/StallionStorage.java +54 -0
  11. package/android/src/main/java/com/stallion/StallionZip.java +127 -0
  12. package/android/src/main/res/layout/stallion_default_error_activity.xml +60 -0
  13. package/android/src/noop/java/com/stallion/Stallion.java +13 -0
  14. package/android/src/noop/java/com/stallion/StallionConstants.java +10 -0
  15. package/android/src/noop/java/com/stallion/StallionModule.java +26 -0
  16. package/android/src/noop/java/com/stallion/StallionPackage.java +29 -0
  17. package/ios/Stallion.xcodeproj/project.pbxproj +283 -0
  18. package/ios/main/Stallion-Bridging-Header.h +3 -0
  19. package/ios/main/Stallion.m +21 -0
  20. package/ios/main/Stallion.swift +69 -0
  21. package/ios/main/StallionConstants.swift +42 -0
  22. package/ios/main/StallionDownloader.swift +124 -0
  23. package/ios/main/StallionModule.h +13 -0
  24. package/ios/main/StallionModule.m +71 -0
  25. package/ios/main/StallionUtil.swift +29 -0
  26. package/ios/noop/Stallion-Bridging-Header.h +2 -0
  27. package/ios/noop/Stallion.m +12 -0
  28. package/ios/noop/Stallion.swift +7 -0
  29. package/ios/noop/StallionModule.h +13 -0
  30. package/ios/noop/StallionModule.m +20 -0
  31. package/package.json +62 -0
  32. package/react-native-stallion.podspec +50 -0
  33. package/src/StallionNativeModule.js +5 -0
  34. package/src/StallionNativeModule.js.map +1 -0
  35. package/src/index.js +29 -0
  36. package/src/index.js.map +1 -0
  37. package/src/main/components/common/ButtonFullWidth/index.js +20 -0
  38. package/src/main/components/common/ButtonFullWidth/index.js.map +1 -0
  39. package/src/main/components/common/ButtonFullWidth/styles.js +42 -0
  40. package/src/main/components/common/ButtonFullWidth/styles.js.map +1 -0
  41. package/src/main/components/common/ErrorView/index.js +18 -0
  42. package/src/main/components/common/ErrorView/index.js.map +1 -0
  43. package/src/main/components/common/ErrorView/styles.js +20 -0
  44. package/src/main/components/common/ErrorView/styles.js.map +1 -0
  45. package/src/main/components/common/Footer/index.js +49 -0
  46. package/src/main/components/common/Footer/index.js.map +1 -0
  47. package/src/main/components/common/Footer/styles.js +76 -0
  48. package/src/main/components/common/Footer/styles.js.map +1 -0
  49. package/src/main/components/common/Header/index.js +50 -0
  50. package/src/main/components/common/Header/index.js.map +1 -0
  51. package/src/main/components/common/Header/styles.js +63 -0
  52. package/src/main/components/common/Header/styles.js.map +1 -0
  53. package/src/main/components/common/OverlayLoader/index.js +26 -0
  54. package/src/main/components/common/OverlayLoader/index.js.map +1 -0
  55. package/src/main/components/common/OverlayLoader/styles.js +33 -0
  56. package/src/main/components/common/OverlayLoader/styles.js.map +1 -0
  57. package/src/main/components/common/ProfileOverlay/index.js +39 -0
  58. package/src/main/components/common/ProfileOverlay/index.js.map +1 -0
  59. package/src/main/components/common/ProfileOverlay/styles.js +37 -0
  60. package/src/main/components/common/ProfileOverlay/styles.js.map +1 -0
  61. package/src/main/components/common/Spinner/index.js +9 -0
  62. package/src/main/components/common/Spinner/index.js.map +1 -0
  63. package/src/main/components/modules/listing/components/BucketCard.js +33 -0
  64. package/src/main/components/modules/listing/components/BucketCard.js.map +1 -0
  65. package/src/main/components/modules/listing/components/BucketCardInfoSection.js +56 -0
  66. package/src/main/components/modules/listing/components/BucketCardInfoSection.js.map +1 -0
  67. package/src/main/components/modules/listing/components/BundleCard.js +36 -0
  68. package/src/main/components/modules/listing/components/BundleCard.js.map +1 -0
  69. package/src/main/components/modules/listing/components/BundleCardInfoSection.js +72 -0
  70. package/src/main/components/modules/listing/components/BundleCardInfoSection.js.map +1 -0
  71. package/src/main/components/modules/listing/components/CardDescriptionContent.js +34 -0
  72. package/src/main/components/modules/listing/components/CardDescriptionContent.js.map +1 -0
  73. package/src/main/components/modules/listing/components/styles/index.js +65 -0
  74. package/src/main/components/modules/listing/components/styles/index.js.map +1 -0
  75. package/src/main/components/modules/listing/hooks/useListing.js +71 -0
  76. package/src/main/components/modules/listing/hooks/useListing.js.map +1 -0
  77. package/src/main/components/modules/listing/index.js +39 -0
  78. package/src/main/components/modules/listing/index.js.map +1 -0
  79. package/src/main/components/modules/listing/styles.js +12 -0
  80. package/src/main/components/modules/listing/styles.js.map +1 -0
  81. package/src/main/components/modules/login/components/Email.js +37 -0
  82. package/src/main/components/modules/login/components/Email.js.map +1 -0
  83. package/src/main/components/modules/login/components/Otp.js +41 -0
  84. package/src/main/components/modules/login/components/Otp.js.map +1 -0
  85. package/src/main/components/modules/login/components/styles/index.js +24 -0
  86. package/src/main/components/modules/login/components/styles/index.js.map +1 -0
  87. package/src/main/components/modules/login/hooks/useLoginFlow.js +60 -0
  88. package/src/main/components/modules/login/hooks/useLoginFlow.js.map +1 -0
  89. package/src/main/components/modules/login/index.js +54 -0
  90. package/src/main/components/modules/login/index.js.map +1 -0
  91. package/src/main/components/modules/login/styles/index.js +34 -0
  92. package/src/main/components/modules/login/styles/index.js.map +1 -0
  93. package/src/main/components/modules/modal/StallionModal.js +73 -0
  94. package/src/main/components/modules/modal/StallionModal.js.map +1 -0
  95. package/src/main/components/modules/modal/hooks/useStallionModal.js +92 -0
  96. package/src/main/components/modules/modal/hooks/useStallionModal.js.map +1 -0
  97. package/src/main/constants/apiConstants.js +10 -0
  98. package/src/main/constants/apiConstants.js.map +1 -0
  99. package/src/main/constants/appConstants.js +71 -0
  100. package/src/main/constants/appConstants.js.map +1 -0
  101. package/src/main/constants/colors.js +14 -0
  102. package/src/main/constants/colors.js.map +1 -0
  103. package/src/main/index.js +7 -0
  104. package/src/main/index.js.map +1 -0
  105. package/src/main/state/actionCreators/useBucketActions.js +37 -0
  106. package/src/main/state/actionCreators/useBucketActions.js.map +1 -0
  107. package/src/main/state/actionCreators/useBundleActions.js +45 -0
  108. package/src/main/state/actionCreators/useBundleActions.js.map +1 -0
  109. package/src/main/state/actionCreators/useDownloadActions.js +47 -0
  110. package/src/main/state/actionCreators/useDownloadActions.js.map +1 -0
  111. package/src/main/state/actionCreators/useMetaActions.js +19 -0
  112. package/src/main/state/actionCreators/useMetaActions.js.map +1 -0
  113. package/src/main/state/actionCreators/useUserActions.js +97 -0
  114. package/src/main/state/actionCreators/useUserActions.js.map +1 -0
  115. package/src/main/state/actions/bucketActions.js +19 -0
  116. package/src/main/state/actions/bucketActions.js.map +1 -0
  117. package/src/main/state/actions/bundleActions.js +25 -0
  118. package/src/main/state/actions/bundleActions.js.map +1 -0
  119. package/src/main/state/actions/downloadActions.js +19 -0
  120. package/src/main/state/actions/downloadActions.js.map +1 -0
  121. package/src/main/state/actions/metaActions.js +8 -0
  122. package/src/main/state/actions/metaActions.js.map +1 -0
  123. package/src/main/state/actions/userActions.js +31 -0
  124. package/src/main/state/actions/userActions.js.map +1 -0
  125. package/src/main/state/index.js +70 -0
  126. package/src/main/state/index.js.map +1 -0
  127. package/src/main/state/reducers/bucketReducer.js +36 -0
  128. package/src/main/state/reducers/bucketReducer.js.map +1 -0
  129. package/src/main/state/reducers/bundleReducer.js +47 -0
  130. package/src/main/state/reducers/bundleReducer.js.map +1 -0
  131. package/src/main/state/reducers/downloadReducer.js +39 -0
  132. package/src/main/state/reducers/downloadReducer.js.map +1 -0
  133. package/src/main/state/reducers/metaReducer.js +17 -0
  134. package/src/main/state/reducers/metaReducer.js.map +1 -0
  135. package/src/main/state/reducers/userReducer.js +70 -0
  136. package/src/main/state/reducers/userReducer.js.map +1 -0
  137. package/src/main/utils/ErrorBoundary.js +13 -0
  138. package/src/main/utils/ErrorBoundary.js.map +1 -0
  139. package/src/main/utils/SharedDataManager.js +25 -0
  140. package/src/main/utils/SharedDataManager.js.map +1 -0
  141. package/src/main/utils/StallionNaitveUtils.js +7 -0
  142. package/src/main/utils/StallionNaitveUtils.js.map +1 -0
  143. package/src/main/utils/apiUtils.js +16 -0
  144. package/src/main/utils/apiUtils.js.map +1 -0
  145. package/src/main/utils/dateUtil.js +39 -0
  146. package/src/main/utils/dateUtil.js.map +1 -0
  147. package/src/main/utils/errorUtil.js +10 -0
  148. package/src/main/utils/errorUtil.js.map +1 -0
  149. package/src/main/utils/useStallionModal.js +18 -0
  150. package/src/main/utils/useStallionModal.js.map +1 -0
  151. package/src/main/utils/withStallion.js +16 -0
  152. package/src/main/utils/withStallion.js.map +1 -0
  153. package/src/nativeScripts/getStallionEnabled.js +8 -0
  154. package/src/nativeScripts/getStallionEnabled.js.map +1 -0
  155. package/src/noop/useStallionModal.js +12 -0
  156. package/src/noop/useStallionModal.js.map +1 -0
  157. package/src/noop/withStallion.js +13 -0
  158. package/src/noop/withStallion.js.map +1 -0
  159. package/src/types/bucket.types.js +7 -0
  160. package/src/types/bucket.types.js.map +1 -0
  161. package/src/types/bundle.types.js +8 -0
  162. package/src/types/bundle.types.js.map +1 -0
  163. package/src/types/download.types.js +7 -0
  164. package/src/types/download.types.js.map +1 -0
  165. package/src/types/globalProvider.types.js +2 -0
  166. package/src/types/globalProvider.types.js.map +1 -0
  167. package/src/types/meta.types.js +6 -0
  168. package/src/types/meta.types.js.map +1 -0
  169. package/src/types/user.types.js +9 -0
  170. package/src/types/user.types.js.map +1 -0
  171. package/src/types/utils.types.js +2 -0
  172. package/src/types/utils.types.js.map +1 -0
  173. package/types/StallionNativeModule.d.ts +4 -0
  174. package/types/StallionNativeModule.d.ts.map +1 -0
  175. package/types/__tests__/index.test.d.ts +1 -0
  176. package/types/__tests__/index.test.d.ts.map +1 -0
  177. package/types/index.d.ts +4 -0
  178. package/types/index.d.ts.map +1 -0
  179. package/types/main/components/common/ButtonFullWidth/index.d.ts +10 -0
  180. package/types/main/components/common/ButtonFullWidth/index.d.ts.map +1 -0
  181. package/types/main/components/common/ButtonFullWidth/styles.d.ts +39 -0
  182. package/types/main/components/common/ButtonFullWidth/styles.d.ts.map +1 -0
  183. package/types/main/components/common/ErrorView/index.d.ts +7 -0
  184. package/types/main/components/common/ErrorView/index.d.ts.map +1 -0
  185. package/types/main/components/common/ErrorView/styles.d.ts +17 -0
  186. package/types/main/components/common/ErrorView/styles.d.ts.map +1 -0
  187. package/types/main/components/common/Footer/index.d.ts +13 -0
  188. package/types/main/components/common/Footer/index.d.ts.map +1 -0
  189. package/types/main/components/common/Footer/styles.d.ts +73 -0
  190. package/types/main/components/common/Footer/styles.d.ts.map +1 -0
  191. package/types/main/components/common/Header/index.d.ts +11 -0
  192. package/types/main/components/common/Header/index.d.ts.map +1 -0
  193. package/types/main/components/common/Header/styles.d.ts +59 -0
  194. package/types/main/components/common/Header/styles.d.ts.map +1 -0
  195. package/types/main/components/common/OverlayLoader/index.d.ts +7 -0
  196. package/types/main/components/common/OverlayLoader/index.d.ts.map +1 -0
  197. package/types/main/components/common/OverlayLoader/styles.d.ts +30 -0
  198. package/types/main/components/common/OverlayLoader/styles.d.ts.map +1 -0
  199. package/types/main/components/common/ProfileOverlay/index.d.ts +10 -0
  200. package/types/main/components/common/ProfileOverlay/index.d.ts.map +1 -0
  201. package/types/main/components/common/ProfileOverlay/styles.d.ts +34 -0
  202. package/types/main/components/common/ProfileOverlay/styles.d.ts.map +1 -0
  203. package/types/main/components/common/Spinner/index.d.ts +4 -0
  204. package/types/main/components/common/Spinner/index.d.ts.map +1 -0
  205. package/types/main/components/modules/listing/components/BucketCard.d.ts +13 -0
  206. package/types/main/components/modules/listing/components/BucketCard.d.ts.map +1 -0
  207. package/types/main/components/modules/listing/components/BucketCardInfoSection.d.ts +11 -0
  208. package/types/main/components/modules/listing/components/BucketCardInfoSection.d.ts.map +1 -0
  209. package/types/main/components/modules/listing/components/BundleCard.d.ts +14 -0
  210. package/types/main/components/modules/listing/components/BundleCard.d.ts.map +1 -0
  211. package/types/main/components/modules/listing/components/BundleCardInfoSection.d.ts +12 -0
  212. package/types/main/components/modules/listing/components/BundleCardInfoSection.d.ts.map +1 -0
  213. package/types/main/components/modules/listing/components/CardDescriptionContent.d.ts +8 -0
  214. package/types/main/components/modules/listing/components/CardDescriptionContent.d.ts.map +1 -0
  215. package/types/main/components/modules/listing/components/styles/index.d.ts +62 -0
  216. package/types/main/components/modules/listing/components/styles/index.d.ts.map +1 -0
  217. package/types/main/components/modules/listing/hooks/useListing.d.ts +11 -0
  218. package/types/main/components/modules/listing/hooks/useListing.d.ts.map +1 -0
  219. package/types/main/components/modules/listing/index.d.ts +4 -0
  220. package/types/main/components/modules/listing/index.d.ts.map +1 -0
  221. package/types/main/components/modules/listing/styles.d.ts +10 -0
  222. package/types/main/components/modules/listing/styles.d.ts.map +1 -0
  223. package/types/main/components/modules/login/components/Email.d.ts +13 -0
  224. package/types/main/components/modules/login/components/Email.d.ts.map +1 -0
  225. package/types/main/components/modules/login/components/Otp.d.ts +12 -0
  226. package/types/main/components/modules/login/components/Otp.d.ts.map +1 -0
  227. package/types/main/components/modules/login/components/styles/index.d.ts +21 -0
  228. package/types/main/components/modules/login/components/styles/index.d.ts.map +1 -0
  229. package/types/main/components/modules/login/hooks/useLoginFlow.d.ts +18 -0
  230. package/types/main/components/modules/login/hooks/useLoginFlow.d.ts.map +1 -0
  231. package/types/main/components/modules/login/index.d.ts +4 -0
  232. package/types/main/components/modules/login/index.d.ts.map +1 -0
  233. package/types/main/components/modules/login/styles/index.d.ts +31 -0
  234. package/types/main/components/modules/login/styles/index.d.ts.map +1 -0
  235. package/types/main/components/modules/modal/StallionModal.d.ts +4 -0
  236. package/types/main/components/modules/modal/StallionModal.d.ts.map +1 -0
  237. package/types/main/components/modules/modal/hooks/useStallionModal.d.ts +23 -0
  238. package/types/main/components/modules/modal/hooks/useStallionModal.d.ts.map +1 -0
  239. package/types/main/constants/apiConstants.d.ts +9 -0
  240. package/types/main/constants/apiConstants.d.ts.map +1 -0
  241. package/types/main/constants/appConstants.d.ts +65 -0
  242. package/types/main/constants/appConstants.d.ts.map +1 -0
  243. package/types/main/constants/colors.d.ts +14 -0
  244. package/types/main/constants/colors.d.ts.map +1 -0
  245. package/types/main/index.d.ts +7 -0
  246. package/types/main/index.d.ts.map +1 -0
  247. package/types/main/state/actionCreators/useBucketActions.d.ts +7 -0
  248. package/types/main/state/actionCreators/useBucketActions.d.ts.map +1 -0
  249. package/types/main/state/actionCreators/useBundleActions.d.ts +8 -0
  250. package/types/main/state/actionCreators/useBundleActions.d.ts.map +1 -0
  251. package/types/main/state/actionCreators/useDownloadActions.d.ts +7 -0
  252. package/types/main/state/actionCreators/useDownloadActions.d.ts.map +1 -0
  253. package/types/main/state/actionCreators/useMetaActions.d.ts +7 -0
  254. package/types/main/state/actionCreators/useMetaActions.d.ts.map +1 -0
  255. package/types/main/state/actionCreators/useUserActions.d.ts +12 -0
  256. package/types/main/state/actionCreators/useUserActions.d.ts.map +1 -0
  257. package/types/main/state/actions/bucketActions.d.ts +5 -0
  258. package/types/main/state/actions/bucketActions.d.ts.map +1 -0
  259. package/types/main/state/actions/bundleActions.d.ts +6 -0
  260. package/types/main/state/actions/bundleActions.d.ts.map +1 -0
  261. package/types/main/state/actions/downloadActions.d.ts +5 -0
  262. package/types/main/state/actions/downloadActions.d.ts.map +1 -0
  263. package/types/main/state/actions/metaActions.d.ts +3 -0
  264. package/types/main/state/actions/metaActions.d.ts.map +1 -0
  265. package/types/main/state/actions/userActions.d.ts +7 -0
  266. package/types/main/state/actions/userActions.d.ts.map +1 -0
  267. package/types/main/state/index.d.ts +6 -0
  268. package/types/main/state/index.d.ts.map +1 -0
  269. package/types/main/state/reducers/bucketReducer.d.ts +4 -0
  270. package/types/main/state/reducers/bucketReducer.d.ts.map +1 -0
  271. package/types/main/state/reducers/bundleReducer.d.ts +4 -0
  272. package/types/main/state/reducers/bundleReducer.d.ts.map +1 -0
  273. package/types/main/state/reducers/downloadReducer.d.ts +4 -0
  274. package/types/main/state/reducers/downloadReducer.d.ts.map +1 -0
  275. package/types/main/state/reducers/metaReducer.d.ts +4 -0
  276. package/types/main/state/reducers/metaReducer.d.ts.map +1 -0
  277. package/types/main/state/reducers/userReducer.d.ts +4 -0
  278. package/types/main/state/reducers/userReducer.d.ts.map +1 -0
  279. package/types/main/utils/ErrorBoundary.d.ts +7 -0
  280. package/types/main/utils/ErrorBoundary.d.ts.map +1 -0
  281. package/types/main/utils/SharedDataManager.d.ts +14 -0
  282. package/types/main/utils/SharedDataManager.d.ts.map +1 -0
  283. package/types/main/utils/StallionNaitveUtils.d.ts +7 -0
  284. package/types/main/utils/StallionNaitveUtils.d.ts.map +1 -0
  285. package/types/main/utils/apiUtils.d.ts +7 -0
  286. package/types/main/utils/apiUtils.d.ts.map +1 -0
  287. package/types/main/utils/dateUtil.d.ts +3 -0
  288. package/types/main/utils/dateUtil.d.ts.map +1 -0
  289. package/types/main/utils/errorUtil.d.ts +10 -0
  290. package/types/main/utils/errorUtil.d.ts.map +1 -0
  291. package/types/main/utils/useStallionModal.d.ts +4 -0
  292. package/types/main/utils/useStallionModal.d.ts.map +1 -0
  293. package/types/main/utils/withStallion.d.ts +4 -0
  294. package/types/main/utils/withStallion.d.ts.map +1 -0
  295. package/types/noop/useStallionModal.d.ts +4 -0
  296. package/types/noop/useStallionModal.d.ts.map +1 -0
  297. package/types/noop/withStallion.d.ts +4 -0
  298. package/types/noop/withStallion.d.ts.map +1 -0
  299. package/types/types/bucket.types.d.ts +33 -0
  300. package/types/types/bucket.types.d.ts.map +1 -0
  301. package/types/types/bundle.types.d.ts +41 -0
  302. package/types/types/bundle.types.d.ts.map +1 -0
  303. package/types/types/download.types.d.ts +27 -0
  304. package/types/types/download.types.d.ts.map +1 -0
  305. package/types/types/globalProvider.types.d.ts +36 -0
  306. package/types/types/globalProvider.types.d.ts.map +1 -0
  307. package/types/types/meta.types.d.ts +15 -0
  308. package/types/types/meta.types.d.ts.map +1 -0
  309. package/types/types/user.types.d.ts +40 -0
  310. package/types/types/user.types.d.ts.map +1 -0
  311. package/types/types/utils.types.d.ts +26 -0
  312. package/types/types/utils.types.d.ts.map +1 -0
@@ -0,0 +1,76 @@
1
+ import { StyleSheet } from 'react-native';
2
+ import { STD_MARGIN } from '../../../constants/appConstants';
3
+ import { COLORS } from '../../../constants/colors';
4
+ const styles = StyleSheet.create({
5
+ shadowContainer: {
6
+ elevation: 5,
7
+ zIndex: 5,
8
+ shadowOpacity: 0.1,
9
+ shadowOffset: {
10
+ height: -20,
11
+ width: 0
12
+ },
13
+ shadowRadius: 10
14
+ },
15
+ noDownloadContainer: {
16
+ justifyContent: 'center',
17
+ alignItems: 'center',
18
+ width: '100%',
19
+ paddingHorizontal: STD_MARGIN,
20
+ paddingVertical: STD_MARGIN / 2
21
+ },
22
+ errorInfoSection: {
23
+ height: STD_MARGIN * 2.5,
24
+ backgroundColor: COLORS.error,
25
+ alignItems: 'center',
26
+ justifyContent: 'center'
27
+ },
28
+ errTxt: {
29
+ fontSize: STD_MARGIN * 1.2,
30
+ color: COLORS.white,
31
+ marginHorizontal: STD_MARGIN / 2
32
+ },
33
+ footerContainer: {
34
+ paddingHorizontal: STD_MARGIN,
35
+ paddingVertical: STD_MARGIN / 2,
36
+ flexDirection: 'row',
37
+ justifyContent: 'space-between',
38
+ alignItems: 'center',
39
+ backgroundColor: COLORS.white
40
+ },
41
+ infoTitle: {
42
+ fontSize: STD_MARGIN * 1.2
43
+ },
44
+ infoSubTitle: {
45
+ fontSize: STD_MARGIN * 1.2,
46
+ marginTop: STD_MARGIN / 2
47
+ },
48
+ alignCenter: {
49
+ alignItems: 'center'
50
+ },
51
+ dividerSection: {
52
+ flex: 1,
53
+ justifyContent: 'flex-start'
54
+ },
55
+ dividerSection2: {
56
+ flex: 0.7,
57
+ justifyContent: 'flex-start'
58
+ },
59
+ bold: {
60
+ fontWeight: 'bold'
61
+ },
62
+ selfCenter: {
63
+ alignSelf: 'center'
64
+ },
65
+ greenColor: {
66
+ color: COLORS.green
67
+ },
68
+ redColor: {
69
+ color: COLORS.red
70
+ },
71
+ switchButton: {
72
+ marginTop: STD_MARGIN / 2
73
+ }
74
+ });
75
+ export default styles;
76
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","STD_MARGIN","COLORS","styles","create","shadowContainer","elevation","zIndex","shadowOpacity","shadowOffset","height","width","shadowRadius","noDownloadContainer","justifyContent","alignItems","paddingHorizontal","paddingVertical","errorInfoSection","backgroundColor","error","errTxt","fontSize","color","white","marginHorizontal","footerContainer","flexDirection","infoTitle","infoSubTitle","marginTop","alignCenter","dividerSection","flex","dividerSection2","bold","fontWeight","selfCenter","alignSelf","greenColor","green","redColor","red","switchButton"],"sourceRoot":"../../../../../../src","sources":["main/components/common/Footer/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,UAAU,QAAQ,iCAAiC;AAC5D,SAASC,MAAM,QAAQ,2BAA2B;AAElD,MAAMC,MAAM,GAAGH,UAAU,CAACI,MAAM,CAAC;EAC/BC,eAAe,EAAE;IACfC,SAAS,EAAE,CAAC;IACZC,MAAM,EAAE,CAAC;IACTC,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE;MAAEC,MAAM,EAAE,CAAC,EAAE;MAAEC,KAAK,EAAE;IAAE,CAAC;IACvCC,YAAY,EAAE;EAChB,CAAC;EACDC,mBAAmB,EAAE;IACnBC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBJ,KAAK,EAAE,MAAM;IACbK,iBAAiB,EAAEf,UAAU;IAC7BgB,eAAe,EAAEhB,UAAU,GAAG;EAChC,CAAC;EACDiB,gBAAgB,EAAE;IAChBR,MAAM,EAAET,UAAU,GAAG,GAAG;IACxBkB,eAAe,EAAEjB,MAAM,CAACkB,KAAK;IAC7BL,UAAU,EAAE,QAAQ;IACpBD,cAAc,EAAE;EAClB,CAAC;EACDO,MAAM,EAAE;IACNC,QAAQ,EAAErB,UAAU,GAAG,GAAG;IAC1BsB,KAAK,EAAErB,MAAM,CAACsB,KAAK;IACnBC,gBAAgB,EAAExB,UAAU,GAAG;EACjC,CAAC;EACDyB,eAAe,EAAE;IACfV,iBAAiB,EAAEf,UAAU;IAC7BgB,eAAe,EAAEhB,UAAU,GAAG,CAAC;IAC/B0B,aAAa,EAAE,KAAK;IACpBb,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBI,eAAe,EAAEjB,MAAM,CAACsB;EAC1B,CAAC;EACDI,SAAS,EAAE;IACTN,QAAQ,EAAErB,UAAU,GAAG;EACzB,CAAC;EACD4B,YAAY,EAAE;IACZP,QAAQ,EAAErB,UAAU,GAAG,GAAG;IAC1B6B,SAAS,EAAE7B,UAAU,GAAG;EAC1B,CAAC;EACD8B,WAAW,EAAE;IACXhB,UAAU,EAAE;EACd,CAAC;EACDiB,cAAc,EAAE;IACdC,IAAI,EAAE,CAAC;IACPnB,cAAc,EAAE;EAClB,CAAC;EACDoB,eAAe,EAAE;IACfD,IAAI,EAAE,GAAG;IACTnB,cAAc,EAAE;EAClB,CAAC;EACDqB,IAAI,EAAE;IACJC,UAAU,EAAE;EACd,CAAC;EACDC,UAAU,EAAE;IACVC,SAAS,EAAE;EACb,CAAC;EACDC,UAAU,EAAE;IACVhB,KAAK,EAAErB,MAAM,CAACsC;EAChB,CAAC;EACDC,QAAQ,EAAE;IACRlB,KAAK,EAAErB,MAAM,CAACwC;EAChB,CAAC;EACDC,YAAY,EAAE;IACZb,SAAS,EAAE7B,UAAU,GAAG;EAC1B;AACF,CAAC,CAAC;AAEF,eAAeE,MAAM"}
@@ -0,0 +1,50 @@
1
+ import React, { memo, useCallback, useState } from 'react';
2
+ import { View, TouchableOpacity, Text, Image } from 'react-native';
3
+ import { BACK_BUTTON_TEXT, CLOSE_BUTTON_TEXT, STALLION_LOGO_URL } from '../../../constants/appConstants';
4
+ import styles from './styles';
5
+ const Header = _ref => {
6
+ let {
7
+ userName,
8
+ title,
9
+ onBackPress,
10
+ onClosePress,
11
+ onProfilePress
12
+ } = _ref;
13
+ const [errorLogoLoading, setErrorLogoLoading] = useState(false);
14
+ const errorInLogoLoading = useCallback(() => {
15
+ setErrorLogoLoading(true);
16
+ }, []);
17
+ return /*#__PURE__*/React.createElement(View, {
18
+ style: styles.headerContainer
19
+ }, onBackPress ? /*#__PURE__*/React.createElement(TouchableOpacity, {
20
+ style: [styles.headerSideSection, styles.alignStart],
21
+ onPress: onBackPress
22
+ }, /*#__PURE__*/React.createElement(Text, {
23
+ style: styles.actionButtonText
24
+ }, BACK_BUTTON_TEXT)) : /*#__PURE__*/React.createElement(View, {
25
+ style: [styles.headerSideSection, styles.alignStart]
26
+ }, userName ? /*#__PURE__*/React.createElement(TouchableOpacity, {
27
+ style: styles.headerProfileButton,
28
+ onPress: onProfilePress
29
+ }, /*#__PURE__*/React.createElement(Text, {
30
+ style: styles.profileInitial
31
+ }, (userName === null || userName === void 0 ? void 0 : userName[0]) || '')) : null), /*#__PURE__*/React.createElement(View, {
32
+ style: styles.headerCenterSection
33
+ }, errorLogoLoading ? /*#__PURE__*/React.createElement(Text, {
34
+ style: styles.headerText
35
+ }, title) : /*#__PURE__*/React.createElement(Image, {
36
+ source: {
37
+ uri: STALLION_LOGO_URL
38
+ },
39
+ style: styles.headerLogo,
40
+ resizeMode: "contain",
41
+ onError: errorInLogoLoading
42
+ })), /*#__PURE__*/React.createElement(TouchableOpacity, {
43
+ style: styles.headerSideSection,
44
+ onPress: onClosePress
45
+ }, /*#__PURE__*/React.createElement(Text, {
46
+ style: styles.actionButtonText
47
+ }, CLOSE_BUTTON_TEXT)));
48
+ };
49
+ export default /*#__PURE__*/memo(Header);
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","memo","useCallback","useState","View","TouchableOpacity","Text","Image","BACK_BUTTON_TEXT","CLOSE_BUTTON_TEXT","STALLION_LOGO_URL","styles","Header","_ref","userName","title","onBackPress","onClosePress","onProfilePress","errorLogoLoading","setErrorLogoLoading","errorInLogoLoading","createElement","style","headerContainer","headerSideSection","alignStart","onPress","actionButtonText","headerProfileButton","profileInitial","headerCenterSection","headerText","source","uri","headerLogo","resizeMode","onError"],"sourceRoot":"../../../../../../src","sources":["main/components/common/Header/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAElE,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,iBAAiB,QACZ,iCAAiC;AAExC,OAAOC,MAAM,MAAM,UAAU;AAU7B,MAAMC,MAAyB,GAAGC,IAAA,IAM5B;EAAA,IAN6B;IACjCC,QAAQ;IACRC,KAAK;IACLC,WAAW;IACXC,YAAY;IACZC;EACF,CAAC,GAAAL,IAAA;EACC,MAAM,CAACM,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGjB,QAAQ,CAAC,KAAK,CAAC;EAC/D,MAAMkB,kBAAkB,GAAGnB,WAAW,CAAC,MAAM;IAC3CkB,mBAAmB,CAAC,IAAI,CAAC;EAC3B,CAAC,EAAE,EAAE,CAAC;EACN,oBACEpB,KAAA,CAAAsB,aAAA,CAAClB,IAAI;IAACmB,KAAK,EAAEZ,MAAM,CAACa;EAAgB,GACjCR,WAAW,gBACVhB,KAAA,CAAAsB,aAAA,CAACjB,gBAAgB;IACfkB,KAAK,EAAE,CAACZ,MAAM,CAACc,iBAAiB,EAAEd,MAAM,CAACe,UAAU,CAAE;IACrDC,OAAO,EAAEX;EAAY,gBAErBhB,KAAA,CAAAsB,aAAA,CAAChB,IAAI;IAACiB,KAAK,EAAEZ,MAAM,CAACiB;EAAiB,GAAEpB,gBAAuB,CAC9C,CAAC,gBAEnBR,KAAA,CAAAsB,aAAA,CAAClB,IAAI;IAACmB,KAAK,EAAE,CAACZ,MAAM,CAACc,iBAAiB,EAAEd,MAAM,CAACe,UAAU;EAAE,GACxDZ,QAAQ,gBACPd,KAAA,CAAAsB,aAAA,CAACjB,gBAAgB;IACfkB,KAAK,EAAEZ,MAAM,CAACkB,mBAAoB;IAClCF,OAAO,EAAET;EAAe,gBAExBlB,KAAA,CAAAsB,aAAA,CAAChB,IAAI;IAACiB,KAAK,EAAEZ,MAAM,CAACmB;EAAe,GAAE,CAAAhB,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAG,CAAC,CAAC,KAAI,EAAS,CAC/C,CAAC,GACjB,IACA,CACP,eACDd,KAAA,CAAAsB,aAAA,CAAClB,IAAI;IAACmB,KAAK,EAAEZ,MAAM,CAACoB;EAAoB,GACrCZ,gBAAgB,gBACfnB,KAAA,CAAAsB,aAAA,CAAChB,IAAI;IAACiB,KAAK,EAAEZ,MAAM,CAACqB;EAAW,GAAEjB,KAAY,CAAC,gBAE9Cf,KAAA,CAAAsB,aAAA,CAACf,KAAK;IACJ0B,MAAM,EAAE;MACNC,GAAG,EAAExB;IACP,CAAE;IACFa,KAAK,EAAEZ,MAAM,CAACwB,UAAW;IACzBC,UAAU,EAAC,SAAS;IACpBC,OAAO,EAAEhB;EAAmB,CAC7B,CAEC,CAAC,eACPrB,KAAA,CAAAsB,aAAA,CAACjB,gBAAgB;IAACkB,KAAK,EAAEZ,MAAM,CAACc,iBAAkB;IAACE,OAAO,EAAEV;EAAa,gBACvEjB,KAAA,CAAAsB,aAAA,CAAChB,IAAI;IAACiB,KAAK,EAAEZ,MAAM,CAACiB;EAAiB,GAAEnB,iBAAwB,CAC/C,CACd,CAAC;AAEX,CAAC;AAED,4BAAeR,IAAI,CAACW,MAAM,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { StyleSheet } from 'react-native';
2
+ import { HEADER_SLAB_HEIGHT } from '../../../constants/appConstants';
3
+ import { COLORS } from '../../../constants/colors';
4
+ const PROFILE_BUTTON_EDGE = HEADER_SLAB_HEIGHT / 2;
5
+ const styles = StyleSheet.create({
6
+ headerContainer: {
7
+ height: HEADER_SLAB_HEIGHT,
8
+ width: '100%',
9
+ flexDirection: 'row',
10
+ justifyContent: 'space-between',
11
+ alignItems: 'center',
12
+ zIndex: 5,
13
+ elevation: 5,
14
+ shadowColor: COLORS.black,
15
+ shadowOpacity: 0.05,
16
+ shadowOffset: {
17
+ height: 20,
18
+ width: 0
19
+ },
20
+ shadowRadius: 10,
21
+ backgroundColor: COLORS.white
22
+ },
23
+ headerSideSection: {
24
+ flex: 1,
25
+ justifyContent: 'center',
26
+ alignItems: 'flex-end',
27
+ padding: HEADER_SLAB_HEIGHT / 5
28
+ },
29
+ headerProfileButton: {
30
+ height: PROFILE_BUTTON_EDGE,
31
+ width: PROFILE_BUTTON_EDGE,
32
+ borderRadius: PROFILE_BUTTON_EDGE / 2,
33
+ justifyContent: 'center',
34
+ alignItems: 'center',
35
+ backgroundColor: COLORS.indigo
36
+ },
37
+ headerCenterSection: {
38
+ flex: 2,
39
+ justifyContent: 'center',
40
+ alignItems: 'center'
41
+ },
42
+ headerText: {
43
+ fontSize: HEADER_SLAB_HEIGHT / 2.5,
44
+ color: COLORS.black,
45
+ fontWeight: 'bold'
46
+ },
47
+ actionButtonText: {
48
+ fontSize: HEADER_SLAB_HEIGHT / 3.5
49
+ },
50
+ alignStart: {
51
+ alignItems: 'flex-start'
52
+ },
53
+ headerLogo: {
54
+ width: HEADER_SLAB_HEIGHT * 2,
55
+ flex: 1
56
+ },
57
+ profileInitial: {
58
+ fontSize: HEADER_SLAB_HEIGHT / 3,
59
+ color: COLORS.white
60
+ }
61
+ });
62
+ export default styles;
63
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","HEADER_SLAB_HEIGHT","COLORS","PROFILE_BUTTON_EDGE","styles","create","headerContainer","height","width","flexDirection","justifyContent","alignItems","zIndex","elevation","shadowColor","black","shadowOpacity","shadowOffset","shadowRadius","backgroundColor","white","headerSideSection","flex","padding","headerProfileButton","borderRadius","indigo","headerCenterSection","headerText","fontSize","color","fontWeight","actionButtonText","alignStart","headerLogo","profileInitial"],"sourceRoot":"../../../../../../src","sources":["main/components/common/Header/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,kBAAkB,QAAQ,iCAAiC;AACpE,SAASC,MAAM,QAAQ,2BAA2B;AAElD,MAAMC,mBAAmB,GAAGF,kBAAkB,GAAG,CAAC;AAElD,MAAMG,MAAM,GAAGJ,UAAU,CAACK,MAAM,CAAC;EAC/BC,eAAe,EAAE;IACfC,MAAM,EAAEN,kBAAkB;IAC1BO,KAAK,EAAE,MAAM;IACbC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBC,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE,CAAC;IACZC,WAAW,EAAEZ,MAAM,CAACa,KAAK;IACzBC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;MAAEV,MAAM,EAAE,EAAE;MAAEC,KAAK,EAAE;IAAE,CAAC;IACtCU,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAEjB,MAAM,CAACkB;EAC1B,CAAC;EACDC,iBAAiB,EAAE;IACjBC,IAAI,EAAE,CAAC;IACPZ,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,UAAU;IACtBY,OAAO,EAAEtB,kBAAkB,GAAG;EAChC,CAAC;EACDuB,mBAAmB,EAAE;IACnBjB,MAAM,EAAEJ,mBAAmB;IAC3BK,KAAK,EAAEL,mBAAmB;IAC1BsB,YAAY,EAAEtB,mBAAmB,GAAG,CAAC;IACrCO,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBQ,eAAe,EAAEjB,MAAM,CAACwB;EAC1B,CAAC;EACDC,mBAAmB,EAAE;IACnBL,IAAI,EAAE,CAAC;IACPZ,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDiB,UAAU,EAAE;IACVC,QAAQ,EAAE5B,kBAAkB,GAAG,GAAG;IAClC6B,KAAK,EAAE5B,MAAM,CAACa,KAAK;IACnBgB,UAAU,EAAE;EACd,CAAC;EACDC,gBAAgB,EAAE;IAChBH,QAAQ,EAAE5B,kBAAkB,GAAG;EACjC,CAAC;EACDgC,UAAU,EAAE;IACVtB,UAAU,EAAE;EACd,CAAC;EACDuB,UAAU,EAAE;IACV1B,KAAK,EAAEP,kBAAkB,GAAG,CAAC;IAC7BqB,IAAI,EAAE;EACR,CAAC;EACDa,cAAc,EAAE;IACdN,QAAQ,EAAE5B,kBAAkB,GAAG,CAAC;IAChC6B,KAAK,EAAE5B,MAAM,CAACkB;EAChB;AACF,CAAC,CAAC;AAEF,eAAehB,MAAM"}
@@ -0,0 +1,26 @@
1
+ import React, { memo } from 'react';
2
+ import { View, Text, ActivityIndicator } from 'react-native';
3
+ import { COLORS } from '../../../constants/colors';
4
+ import { DOWNLOADING_TEXT } from '../../../constants/appConstants';
5
+ import styles from './styles';
6
+ const OverlayLoader = _ref => {
7
+ let {
8
+ currentDownloadFraction
9
+ } = _ref;
10
+ return /*#__PURE__*/React.createElement(View, {
11
+ style: styles.loaderContainer
12
+ }, currentDownloadFraction > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
13
+ style: styles.downloadingText
14
+ }, DOWNLOADING_TEXT), /*#__PURE__*/React.createElement(View, {
15
+ style: styles.progressOuter
16
+ }, /*#__PURE__*/React.createElement(View, {
17
+ style: [styles.progressInner, {
18
+ width: `${currentDownloadFraction * 100}%`
19
+ }]
20
+ }))) : /*#__PURE__*/React.createElement(ActivityIndicator, {
21
+ color: COLORS.indigo,
22
+ size: 'large'
23
+ }));
24
+ };
25
+ export default /*#__PURE__*/memo(OverlayLoader);
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","memo","View","Text","ActivityIndicator","COLORS","DOWNLOADING_TEXT","styles","OverlayLoader","_ref","currentDownloadFraction","createElement","style","loaderContainer","Fragment","downloadingText","progressOuter","progressInner","width","color","indigo","size"],"sourceRoot":"../../../../../../src","sources":["main/components/common/OverlayLoader/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,IAAI,EAAEC,IAAI,EAAEC,iBAAiB,QAAQ,cAAc;AAE5D,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,gBAAgB,QAAQ,iCAAiC;AAElE,OAAOC,MAAM,MAAM,UAAU;AAM7B,MAAMC,aAAuC,GAAGC,IAAA,IAE1C;EAAA,IAF2C;IAC/CC;EACF,CAAC,GAAAD,IAAA;EACC,oBACET,KAAA,CAAAW,aAAA,CAACT,IAAI;IAACU,KAAK,EAAEL,MAAM,CAACM;EAAgB,GACjCH,uBAAuB,GAAG,CAAC,gBAC1BV,KAAA,CAAAW,aAAA,CAAAX,KAAA,CAAAc,QAAA,qBACEd,KAAA,CAAAW,aAAA,CAACR,IAAI;IAACS,KAAK,EAAEL,MAAM,CAACQ;EAAgB,GAAET,gBAAuB,CAAC,eAC9DN,KAAA,CAAAW,aAAA,CAACT,IAAI;IAACU,KAAK,EAAEL,MAAM,CAACS;EAAc,gBAChChB,KAAA,CAAAW,aAAA,CAACT,IAAI;IACHU,KAAK,EAAE,CACLL,MAAM,CAACU,aAAa,EACpB;MACEC,KAAK,EAAG,GAAER,uBAAuB,GAAG,GAAI;IAC1C,CAAC;EACD,CACH,CACG,CACN,CAAC,gBAEHV,KAAA,CAAAW,aAAA,CAACP,iBAAiB;IAACe,KAAK,EAAEd,MAAM,CAACe,MAAO;IAACC,IAAI,EAAE;EAAQ,CAAE,CAEvD,CAAC;AAEX,CAAC;AAED,4BAAepB,IAAI,CAACO,aAAa,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { StyleSheet } from 'react-native';
2
+ import { STD_MARGIN } from '../../../constants/appConstants';
3
+ import { COLORS } from '../../../constants/colors';
4
+ const styles = StyleSheet.create({
5
+ loaderContainer: {
6
+ position: 'absolute',
7
+ height: '100%',
8
+ width: '100%',
9
+ backgroundColor: COLORS.black7,
10
+ justifyContent: 'center',
11
+ alignItems: 'center'
12
+ },
13
+ progressOuter: {
14
+ width: '80%',
15
+ height: STD_MARGIN,
16
+ borderRadius: STD_MARGIN / 2,
17
+ backgroundColor: COLORS.black7,
18
+ justifyContent: 'flex-start',
19
+ flexDirection: 'row',
20
+ margin: STD_MARGIN
21
+ },
22
+ progressInner: {
23
+ height: STD_MARGIN,
24
+ borderRadius: STD_MARGIN / 2,
25
+ backgroundColor: COLORS.indigo
26
+ },
27
+ downloadingText: {
28
+ color: COLORS.white,
29
+ fontSize: STD_MARGIN * 2
30
+ }
31
+ });
32
+ export default styles;
33
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","STD_MARGIN","COLORS","styles","create","loaderContainer","position","height","width","backgroundColor","black7","justifyContent","alignItems","progressOuter","borderRadius","flexDirection","margin","progressInner","indigo","downloadingText","color","white","fontSize"],"sourceRoot":"../../../../../../src","sources":["main/components/common/OverlayLoader/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,UAAU,QAAQ,iCAAiC;AAC5D,SAASC,MAAM,QAAQ,2BAA2B;AAElD,MAAMC,MAAM,GAAGH,UAAU,CAACI,MAAM,CAAC;EAC/BC,eAAe,EAAE;IACfC,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE,MAAM;IACbC,eAAe,EAAEP,MAAM,CAACQ,MAAM;IAC9BC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDC,aAAa,EAAE;IACbL,KAAK,EAAE,KAAK;IACZD,MAAM,EAAEN,UAAU;IAClBa,YAAY,EAAEb,UAAU,GAAG,CAAC;IAC5BQ,eAAe,EAAEP,MAAM,CAACQ,MAAM;IAC9BC,cAAc,EAAE,YAAY;IAC5BI,aAAa,EAAE,KAAK;IACpBC,MAAM,EAAEf;EACV,CAAC;EACDgB,aAAa,EAAE;IACbV,MAAM,EAAEN,UAAU;IAClBa,YAAY,EAAEb,UAAU,GAAG,CAAC;IAC5BQ,eAAe,EAAEP,MAAM,CAACgB;EAC1B,CAAC;EACDC,eAAe,EAAE;IACfC,KAAK,EAAElB,MAAM,CAACmB,KAAK;IACnBC,QAAQ,EAAErB,UAAU,GAAG;EACzB;AACF,CAAC,CAAC;AAEF,eAAeE,MAAM"}
@@ -0,0 +1,39 @@
1
+ import React, { memo } from 'react';
2
+ import { View, Text } from 'react-native';
3
+ import styles from './styles';
4
+ import { BACK_BUTTON_TEXT, LOGOUT_BUTTON_TEXT, PROFILE_TITLE } from '../../../constants/appConstants';
5
+ import ButtonFullWidth from '../ButtonFullWidth';
6
+ const ProfileOverlay = _ref => {
7
+ let {
8
+ fullName,
9
+ email,
10
+ onBackPress,
11
+ onLogoutPress
12
+ } = _ref;
13
+ return /*#__PURE__*/React.createElement(View, {
14
+ style: styles.profileContainer
15
+ }, /*#__PURE__*/React.createElement(View, {
16
+ style: styles.titleContainer
17
+ }, /*#__PURE__*/React.createElement(Text, {
18
+ style: styles.profileTitle
19
+ }, PROFILE_TITLE)), /*#__PURE__*/React.createElement(View, {
20
+ style: styles.infoContainer
21
+ }, /*#__PURE__*/React.createElement(Text, {
22
+ style: styles.profileInfoText
23
+ }, fullName), /*#__PURE__*/React.createElement(Text, {
24
+ style: styles.profileInfoText
25
+ }, email), /*#__PURE__*/React.createElement(View, {
26
+ style: styles.buttonContainer
27
+ }, /*#__PURE__*/React.createElement(ButtonFullWidth, {
28
+ onPress: onLogoutPress,
29
+ buttonText: LOGOUT_BUTTON_TEXT
30
+ })), /*#__PURE__*/React.createElement(View, {
31
+ style: styles.buttonContainer
32
+ }, /*#__PURE__*/React.createElement(ButtonFullWidth, {
33
+ primary: false,
34
+ onPress: onBackPress,
35
+ buttonText: BACK_BUTTON_TEXT
36
+ }))));
37
+ };
38
+ export default /*#__PURE__*/memo(ProfileOverlay);
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","memo","View","Text","styles","BACK_BUTTON_TEXT","LOGOUT_BUTTON_TEXT","PROFILE_TITLE","ButtonFullWidth","ProfileOverlay","_ref","fullName","email","onBackPress","onLogoutPress","createElement","style","profileContainer","titleContainer","profileTitle","infoContainer","profileInfoText","buttonContainer","onPress","buttonText","primary"],"sourceRoot":"../../../../../../src","sources":["main/components/common/ProfileOverlay/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEzC,OAAOC,MAAM,MAAM,UAAU;AAC7B,SACEC,gBAAgB,EAChBC,kBAAkB,EAClBC,aAAa,QACR,iCAAiC;AACxC,OAAOC,eAAe,MAAM,oBAAoB;AAShD,MAAMC,cAAyC,GAAGC,IAAA,IAK5C;EAAA,IAL6C;IACjDC,QAAQ;IACRC,KAAK;IACLC,WAAW;IACXC;EACF,CAAC,GAAAJ,IAAA;EACC,oBACEV,KAAA,CAAAe,aAAA,CAACb,IAAI;IAACc,KAAK,EAAEZ,MAAM,CAACa;EAAiB,gBACnCjB,KAAA,CAAAe,aAAA,CAACb,IAAI;IAACc,KAAK,EAAEZ,MAAM,CAACc;EAAe,gBACjClB,KAAA,CAAAe,aAAA,CAACZ,IAAI;IAACa,KAAK,EAAEZ,MAAM,CAACe;EAAa,GAAEZ,aAAoB,CACnD,CAAC,eACPP,KAAA,CAAAe,aAAA,CAACb,IAAI;IAACc,KAAK,EAAEZ,MAAM,CAACgB;EAAc,gBAChCpB,KAAA,CAAAe,aAAA,CAACZ,IAAI;IAACa,KAAK,EAAEZ,MAAM,CAACiB;EAAgB,GAAEV,QAAe,CAAC,eACtDX,KAAA,CAAAe,aAAA,CAACZ,IAAI;IAACa,KAAK,EAAEZ,MAAM,CAACiB;EAAgB,GAAET,KAAY,CAAC,eACnDZ,KAAA,CAAAe,aAAA,CAACb,IAAI;IAACc,KAAK,EAAEZ,MAAM,CAACkB;EAAgB,gBAClCtB,KAAA,CAAAe,aAAA,CAACP,eAAe;IACde,OAAO,EAAET,aAAc;IACvBU,UAAU,EAAElB;EAAmB,CAChC,CACG,CAAC,eACPN,KAAA,CAAAe,aAAA,CAACb,IAAI;IAACc,KAAK,EAAEZ,MAAM,CAACkB;EAAgB,gBAClCtB,KAAA,CAAAe,aAAA,CAACP,eAAe;IACdiB,OAAO,EAAE,KAAM;IACfF,OAAO,EAAEV,WAAY;IACrBW,UAAU,EAAEnB;EAAiB,CAC9B,CACG,CACF,CACF,CAAC;AAEX,CAAC;AAED,4BAAeJ,IAAI,CAACQ,cAAc,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { StyleSheet } from 'react-native';
2
+ import { COLORS } from '../../../constants/colors';
3
+ import { HEADER_SLAB_HEIGHT, STD_MARGIN } from '../../../constants/appConstants';
4
+ const styles = StyleSheet.create({
5
+ profileContainer: {
6
+ position: 'absolute',
7
+ height: '100%',
8
+ width: '100%',
9
+ backgroundColor: COLORS.white,
10
+ justifyContent: 'center',
11
+ alignItems: 'center'
12
+ },
13
+ profileTitle: {
14
+ fontSize: HEADER_SLAB_HEIGHT,
15
+ marginVertical: STD_MARGIN
16
+ },
17
+ profileInfoText: {
18
+ fontSize: HEADER_SLAB_HEIGHT / 2.5,
19
+ marginVertical: STD_MARGIN
20
+ },
21
+ buttonContainer: {
22
+ width: '80%',
23
+ margin: STD_MARGIN
24
+ },
25
+ titleContainer: {
26
+ flex: 1,
27
+ justifyContent: 'flex-end'
28
+ },
29
+ infoContainer: {
30
+ flex: 3,
31
+ justifyContent: 'center',
32
+ alignItems: 'center',
33
+ width: '100%'
34
+ }
35
+ });
36
+ export default styles;
37
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","COLORS","HEADER_SLAB_HEIGHT","STD_MARGIN","styles","create","profileContainer","position","height","width","backgroundColor","white","justifyContent","alignItems","profileTitle","fontSize","marginVertical","profileInfoText","buttonContainer","margin","titleContainer","flex","infoContainer"],"sourceRoot":"../../../../../../src","sources":["main/components/common/ProfileOverlay/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SACEC,kBAAkB,EAClBC,UAAU,QACL,iCAAiC;AAExC,MAAMC,MAAM,GAAGJ,UAAU,CAACK,MAAM,CAAC;EAC/BC,gBAAgB,EAAE;IAChBC,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE,MAAM;IACbC,eAAe,EAAET,MAAM,CAACU,KAAK;IAC7BC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDC,YAAY,EAAE;IACZC,QAAQ,EAAEb,kBAAkB;IAC5Bc,cAAc,EAAEb;EAClB,CAAC;EACDc,eAAe,EAAE;IACfF,QAAQ,EAAEb,kBAAkB,GAAG,GAAG;IAClCc,cAAc,EAAEb;EAClB,CAAC;EACDe,eAAe,EAAE;IACfT,KAAK,EAAE,KAAK;IACZU,MAAM,EAAEhB;EACV,CAAC;EACDiB,cAAc,EAAE;IACdC,IAAI,EAAE,CAAC;IACPT,cAAc,EAAE;EAClB,CAAC;EACDU,aAAa,EAAE;IACbD,IAAI,EAAE,CAAC;IACPT,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBJ,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAeL,MAAM"}
@@ -0,0 +1,9 @@
1
+ import React, { memo } from 'react';
2
+ import { ActivityIndicator } from 'react-native';
3
+ const Spinner = () => {
4
+ return /*#__PURE__*/React.createElement(ActivityIndicator, {
5
+ size: 'large'
6
+ });
7
+ };
8
+ export default /*#__PURE__*/memo(Spinner);
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","memo","ActivityIndicator","Spinner","createElement","size"],"sourceRoot":"../../../../../../src","sources":["main/components/common/Spinner/index.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,iBAAiB,QAAQ,cAAc;AAEhD,MAAMC,OAAO,GAAGA,CAAA,KAAM;EACpB,oBAAOH,KAAA,CAAAI,aAAA,CAACF,iBAAiB;IAACG,IAAI,EAAE;EAAQ,CAAE,CAAC;AAC7C,CAAC;AAED,4BAAeJ,IAAI,CAACE,OAAO,CAAC"}
@@ -0,0 +1,33 @@
1
+ import React, { memo, useContext, useMemo } from 'react';
2
+ import { View, TouchableOpacity } from 'react-native';
3
+ import { GlobalContext } from '../../../../state';
4
+ import BucketCardInfoSection from './BucketCardInfoSection';
5
+ import styles from './styles';
6
+ const BucketCard = _ref => {
7
+ let {
8
+ id,
9
+ name,
10
+ updatedAt,
11
+ bundleCount,
12
+ handlePress
13
+ } = _ref;
14
+ const {
15
+ metaState
16
+ } = useContext(GlobalContext);
17
+ const isApplied = useMemo(() => (metaState === null || metaState === void 0 ? void 0 : metaState.activeBucket) === id, [metaState, id]);
18
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
19
+ style: styles.cardContainer,
20
+ onPress: handlePress,
21
+ activeOpacity: 0.5
22
+ }, /*#__PURE__*/React.createElement(View, {
23
+ style: styles.infoSection
24
+ }, /*#__PURE__*/React.createElement(BucketCardInfoSection, {
25
+ name: name,
26
+ updatedAt: updatedAt,
27
+ bundleCount: bundleCount === null || bundleCount === void 0 ? void 0 : bundleCount.toString(),
28
+ isApplied: isApplied,
29
+ switchState: (metaState === null || metaState === void 0 ? void 0 : metaState.switchState) || false
30
+ })));
31
+ };
32
+ export default /*#__PURE__*/memo(BucketCard);
33
+ //# sourceMappingURL=BucketCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","memo","useContext","useMemo","View","TouchableOpacity","GlobalContext","BucketCardInfoSection","styles","BucketCard","_ref","id","name","updatedAt","bundleCount","handlePress","metaState","isApplied","activeBucket","createElement","style","cardContainer","onPress","activeOpacity","infoSection","toString","switchState"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/listing/components/BucketCard.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AACxD,SAASC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAErD,SAASC,aAAa,QAAQ,mBAAmB;AACjD,OAAOC,qBAAqB,MAAM,yBAAyB;AAG3D,OAAOC,MAAM,MAAM,UAAU;AAW7B,MAAMC,UAAiC,GAAGC,IAAA,IAMpC;EAAA,IANqC;IACzCC,EAAE;IACFC,IAAI;IACJC,SAAS;IACTC,WAAW;IACXC;EACF,CAAC,GAAAL,IAAA;EACC,MAAM;IAAEM;EAAU,CAAC,GAAGd,UAAU,CAACI,aAAa,CAAC;EAC/C,MAAMW,SAAS,GAAGd,OAAO,CACvB,MAAM,CAAAa,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEE,YAAY,MAAKP,EAAE,EACpC,CAACK,SAAS,EAAEL,EAAE,CAChB,CAAC;EACD,oBACEX,KAAA,CAAAmB,aAAA,CAACd,gBAAgB;IACfe,KAAK,EAAEZ,MAAM,CAACa,aAAc;IAC5BC,OAAO,EAAEP,WAAY;IACrBQ,aAAa,EAAE;EAAI,gBAEnBvB,KAAA,CAAAmB,aAAA,CAACf,IAAI;IAACgB,KAAK,EAAEZ,MAAM,CAACgB;EAAY,gBAC9BxB,KAAA,CAAAmB,aAAA,CAACZ,qBAAqB;IACpBK,IAAI,EAAEA,IAAK;IACXC,SAAS,EAAEA,SAAU;IACrBC,WAAW,EAAEA,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEW,QAAQ,CAAC,CAAE;IACrCR,SAAS,EAAEA,SAAU;IACrBS,WAAW,EAAE,CAAAV,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEU,WAAW,KAAI;EAAM,CAC9C,CACG,CACU,CAAC;AAEvB,CAAC;AAED,4BAAezB,IAAI,CAACQ,UAAU,CAAC"}
@@ -0,0 +1,56 @@
1
+ import React, { useMemo } from 'react';
2
+ import { Text, View } from 'react-native';
3
+ import CardDescriptionContent from './CardDescriptionContent';
4
+ import { parseDateTime } from '../../../../utils/dateUtil';
5
+ import { COLORS } from '../../../../constants/colors';
6
+ import { BUCKET_CARD_TEXTS, NOT_APPLICABLE_TEXT, VERSION_PREFIX } from '../../../../constants/appConstants';
7
+ import styles from './styles';
8
+ const BucketCardInfoSection = _ref => {
9
+ let {
10
+ name,
11
+ updatedAt,
12
+ bundleCount,
13
+ isApplied,
14
+ switchState
15
+ } = _ref;
16
+ const renderStateText = useMemo(() => {
17
+ if (isApplied && !switchState) return {
18
+ text: BUCKET_CARD_TEXTS.DOWNLOADED,
19
+ color: COLORS.orange
20
+ };
21
+ if (isApplied && switchState) return {
22
+ text: BUCKET_CARD_TEXTS.APPLIED,
23
+ color: COLORS.green
24
+ };
25
+ return null;
26
+ }, [isApplied, switchState]);
27
+ const updatedAtText = useMemo(() => {
28
+ return parseDateTime(updatedAt);
29
+ }, [updatedAt]);
30
+ return /*#__PURE__*/React.createElement(View, {
31
+ style: styles.container
32
+ }, /*#__PURE__*/React.createElement(View, {
33
+ style: styles.rowContainer
34
+ }, /*#__PURE__*/React.createElement(Text, {
35
+ style: [styles.titleText, styles.bold]
36
+ }, name), /*#__PURE__*/React.createElement(Text, {
37
+ style: [styles.appliedText, {
38
+ color: renderStateText === null || renderStateText === void 0 ? void 0 : renderStateText.color
39
+ }]
40
+ }, renderStateText === null || renderStateText === void 0 ? void 0 : renderStateText.text)), /*#__PURE__*/React.createElement(View, {
41
+ style: styles.divider
42
+ }), /*#__PURE__*/React.createElement(View, {
43
+ style: styles.rowContainer
44
+ }, /*#__PURE__*/React.createElement(CardDescriptionContent, {
45
+ title: BUCKET_CARD_TEXTS.VERSION,
46
+ subtitle: bundleCount && +bundleCount ? `${VERSION_PREFIX}${bundleCount}` : NOT_APPLICABLE_TEXT
47
+ }), /*#__PURE__*/React.createElement(CardDescriptionContent, {
48
+ title: BUCKET_CARD_TEXTS.BUNDLES,
49
+ subtitle: bundleCount && +bundleCount ? bundleCount : 0
50
+ }), /*#__PURE__*/React.createElement(CardDescriptionContent, {
51
+ title: BUCKET_CARD_TEXTS.UPDATED,
52
+ subtitle: updatedAtText
53
+ })));
54
+ };
55
+ export default BucketCardInfoSection;
56
+ //# sourceMappingURL=BucketCardInfoSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useMemo","Text","View","CardDescriptionContent","parseDateTime","COLORS","BUCKET_CARD_TEXTS","NOT_APPLICABLE_TEXT","VERSION_PREFIX","styles","BucketCardInfoSection","_ref","name","updatedAt","bundleCount","isApplied","switchState","renderStateText","text","DOWNLOADED","color","orange","APPLIED","green","updatedAtText","createElement","style","container","rowContainer","titleText","bold","appliedText","divider","title","VERSION","subtitle","BUNDLES","UPDATED"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/listing/components/BucketCardInfoSection.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEzC,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,4BAA4B;AAE1D,SAASC,MAAM,QAAQ,8BAA8B;AACrD,SACEC,iBAAiB,EACjBC,mBAAmB,EACnBC,cAAc,QACT,oCAAoC;AAE3C,OAAOC,MAAM,MAAM,UAAU;AAU7B,MAAMC,qBAAuD,GAAGC,IAAA,IAM1D;EAAA,IAN2D;IAC/DC,IAAI;IACJC,SAAS;IACTC,WAAW;IACXC,SAAS;IACTC;EACF,CAAC,GAAAL,IAAA;EACC,MAAMM,eAAe,GAAGjB,OAAO,CAAC,MAAM;IACpC,IAAIe,SAAS,IAAI,CAACC,WAAW,EAC3B,OAAO;MAAEE,IAAI,EAAEZ,iBAAiB,CAACa,UAAU;MAAEC,KAAK,EAAEf,MAAM,CAACgB;IAAO,CAAC;IAErE,IAAIN,SAAS,IAAIC,WAAW,EAC1B,OAAO;MAAEE,IAAI,EAAEZ,iBAAiB,CAACgB,OAAO;MAAEF,KAAK,EAAEf,MAAM,CAACkB;IAAM,CAAC;IAEjE,OAAO,IAAI;EACb,CAAC,EAAE,CAACR,SAAS,EAAEC,WAAW,CAAC,CAAC;EAE5B,MAAMQ,aAAa,GAAGxB,OAAO,CAAC,MAAM;IAClC,OAAOI,aAAa,CAACS,SAAS,CAAC;EACjC,CAAC,EAAE,CAACA,SAAS,CAAC,CAAC;EAEf,oBACEd,KAAA,CAAA0B,aAAA,CAACvB,IAAI;IAACwB,KAAK,EAAEjB,MAAM,CAACkB;EAAU,gBAC5B5B,KAAA,CAAA0B,aAAA,CAACvB,IAAI;IAACwB,KAAK,EAAEjB,MAAM,CAACmB;EAAa,gBAC/B7B,KAAA,CAAA0B,aAAA,CAACxB,IAAI;IAACyB,KAAK,EAAE,CAACjB,MAAM,CAACoB,SAAS,EAAEpB,MAAM,CAACqB,IAAI;EAAE,GAAElB,IAAW,CAAC,eAC3Db,KAAA,CAAA0B,aAAA,CAACxB,IAAI;IAACyB,KAAK,EAAE,CAACjB,MAAM,CAACsB,WAAW,EAAE;MAAEX,KAAK,EAAEH,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAEG;IAAM,CAAC;EAAE,GAClEH,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAEC,IACd,CACF,CAAC,eACPnB,KAAA,CAAA0B,aAAA,CAACvB,IAAI;IAACwB,KAAK,EAAEjB,MAAM,CAACuB;EAAQ,CAAE,CAAC,eAC/BjC,KAAA,CAAA0B,aAAA,CAACvB,IAAI;IAACwB,KAAK,EAAEjB,MAAM,CAACmB;EAAa,gBAC/B7B,KAAA,CAAA0B,aAAA,CAACtB,sBAAsB;IACrB8B,KAAK,EAAE3B,iBAAiB,CAAC4B,OAAQ;IACjCC,QAAQ,EACNrB,WAAW,IAAI,CAACA,WAAW,GACtB,GAAEN,cAAe,GAAEM,WAAY,EAAC,GACjCP;EACL,CACF,CAAC,eACFR,KAAA,CAAA0B,aAAA,CAACtB,sBAAsB;IACrB8B,KAAK,EAAE3B,iBAAiB,CAAC8B,OAAQ;IACjCD,QAAQ,EAAErB,WAAW,IAAI,CAACA,WAAW,GAAGA,WAAW,GAAG;EAAE,CACzD,CAAC,eACFf,KAAA,CAAA0B,aAAA,CAACtB,sBAAsB;IACrB8B,KAAK,EAAE3B,iBAAiB,CAAC+B,OAAQ;IACjCF,QAAQ,EAAEX;EAAc,CACzB,CACG,CACF,CAAC;AAEX,CAAC;AAED,eAAed,qBAAqB"}
@@ -0,0 +1,36 @@
1
+ import React, { useContext, useMemo, memo } from 'react';
2
+ import { View } from 'react-native';
3
+ import BundleCardInfoSection from './BundleCardInfoSection';
4
+ import styles from './styles';
5
+ import { GlobalContext } from '../../../../state';
6
+ const BundleCard = _ref => {
7
+ let {
8
+ version,
9
+ name,
10
+ description,
11
+ updatedAt,
12
+ author
13
+ } = _ref;
14
+ const {
15
+ metaState,
16
+ bundleState
17
+ } = useContext(GlobalContext);
18
+ const isApplied = useMemo(() => {
19
+ if (metaState.activeBucket === bundleState.selectedBucketId && metaState.activeVersion === `${version}`) return true;
20
+ return false;
21
+ }, [metaState.activeBucket, metaState.activeVersion, bundleState.selectedBucketId, version]);
22
+ return /*#__PURE__*/React.createElement(View, {
23
+ style: styles.cardContainer
24
+ }, /*#__PURE__*/React.createElement(View, {
25
+ style: styles.infoSection
26
+ }, /*#__PURE__*/React.createElement(BundleCardInfoSection, {
27
+ name: name,
28
+ version: version,
29
+ description: description,
30
+ author: author,
31
+ updatedAt: updatedAt,
32
+ isApplied: isApplied
33
+ })));
34
+ };
35
+ export default /*#__PURE__*/memo(BundleCard);
36
+ //# sourceMappingURL=BundleCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useContext","useMemo","memo","View","BundleCardInfoSection","styles","GlobalContext","BundleCard","_ref","version","name","description","updatedAt","author","metaState","bundleState","isApplied","activeBucket","selectedBucketId","activeVersion","createElement","style","cardContainer","infoSection"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/listing/components/BundleCard.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,OAAO,EAAEC,IAAI,QAAQ,OAAO;AACxD,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,qBAAqB,MAAM,yBAAyB;AAE3D,OAAOC,MAAM,MAAM,UAAU;AAC7B,SAASC,aAAa,QAAQ,mBAAmB;AAajD,MAAMC,UAAiC,GAAGC,IAAA,IAMpC;EAAA,IANqC;IACzCC,OAAO;IACPC,IAAI;IACJC,WAAW;IACXC,SAAS;IACTC;EACF,CAAC,GAAAL,IAAA;EACC,MAAM;IAAEM,SAAS;IAAEC;EAAY,CAAC,GAAGf,UAAU,CAACM,aAAa,CAAC;EAC5D,MAAMU,SAAS,GAAGf,OAAO,CAAU,MAAM;IACvC,IACEa,SAAS,CAACG,YAAY,KAAKF,WAAW,CAACG,gBAAgB,IACvDJ,SAAS,CAACK,aAAa,KAAM,GAAEV,OAAQ,EAAC,EAExC,OAAO,IAAI;IACb,OAAO,KAAK;EACd,CAAC,EAAE,CACDK,SAAS,CAACG,YAAY,EACtBH,SAAS,CAACK,aAAa,EACvBJ,WAAW,CAACG,gBAAgB,EAC5BT,OAAO,CACR,CAAC;EACF,oBACEV,KAAA,CAAAqB,aAAA,CAACjB,IAAI;IAACkB,KAAK,EAAEhB,MAAM,CAACiB;EAAc,gBAChCvB,KAAA,CAAAqB,aAAA,CAACjB,IAAI;IAACkB,KAAK,EAAEhB,MAAM,CAACkB;EAAY,gBAC9BxB,KAAA,CAAAqB,aAAA,CAAChB,qBAAqB;IACpBM,IAAI,EAAEA,IAAK;IACXD,OAAO,EAAEA,OAAQ;IACjBE,WAAW,EAAEA,WAAY;IACzBE,MAAM,EAAEA,MAAO;IACfD,SAAS,EAAEA,SAAU;IACrBI,SAAS,EAAEA;EAAU,CACtB,CACG,CACF,CAAC;AAEX,CAAC;AAED,4BAAed,IAAI,CAACK,UAAU,CAAC"}
@@ -0,0 +1,72 @@
1
+ import React, { useCallback, useContext, useMemo } from 'react';
2
+ import { Text, View } from 'react-native';
3
+ import { GlobalContext } from '../../../../state';
4
+ import CardDescriptionContent from './CardDescriptionContent';
5
+ import { parseDateTime } from '../../../../utils/dateUtil';
6
+ import { BUCKET_CARD_TEXTS, BUNDLE_APPLIED_TEXT, BUNDLE_CARD_AUTHOR, BUNDLE_CARD_RELEASE_NOTE, DOWNLOADED_TEXT, DOWNLOAD_BUTTON_TEXT, NO_RELEASE_NOTE_TEXT, SWITCH_STATE_KEYS } from '../../../../constants/appConstants';
7
+ import { COLORS } from '../../../../constants/colors';
8
+ import styles from './styles';
9
+ const BundleCardInfoSection = _ref => {
10
+ let {
11
+ version,
12
+ description,
13
+ updatedAt,
14
+ author,
15
+ isApplied
16
+ } = _ref;
17
+ const {
18
+ metaState,
19
+ bundleState: {
20
+ selectedBucketId
21
+ },
22
+ actions: {
23
+ downloadBundle
24
+ }
25
+ } = useContext(GlobalContext);
26
+ const stateColor = useMemo(() => {
27
+ if (isApplied && !metaState.switchState) return COLORS.orange;
28
+ if (isApplied && metaState.switchState) return COLORS.green;
29
+ return COLORS.blue;
30
+ }, [isApplied, metaState.switchState]);
31
+ const updatedAtText = useMemo(() => {
32
+ return parseDateTime(updatedAt);
33
+ }, [updatedAt]);
34
+ const handleDownloadPress = useCallback(() => {
35
+ if (!isApplied && selectedBucketId && version) {
36
+ downloadBundle(version, selectedBucketId);
37
+ }
38
+ }, [isApplied, selectedBucketId, version, downloadBundle]);
39
+ return /*#__PURE__*/React.createElement(View, {
40
+ style: styles.container
41
+ }, /*#__PURE__*/React.createElement(View, {
42
+ style: styles.rowContainer
43
+ }, /*#__PURE__*/React.createElement(Text, {
44
+ style: [styles.titleText, styles.bold]
45
+ }, "v", version), /*#__PURE__*/React.createElement(Text, {
46
+ onPress: handleDownloadPress,
47
+ style: [styles.appliedText, {
48
+ color: stateColor
49
+ }]
50
+ }, isApplied ? DOWNLOADED_TEXT : DOWNLOAD_BUTTON_TEXT)), description ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
51
+ style: styles.releaseNoteText
52
+ }, BUNDLE_CARD_RELEASE_NOTE), /*#__PURE__*/React.createElement(Text, {
53
+ style: styles.releaseNoteDescriptionText
54
+ }, description)) : /*#__PURE__*/React.createElement(Text, {
55
+ style: styles.releaseNoteText
56
+ }, NO_RELEASE_NOTE_TEXT), /*#__PURE__*/React.createElement(View, {
57
+ style: styles.divider
58
+ }), /*#__PURE__*/React.createElement(View, {
59
+ style: styles.rowContainer
60
+ }, /*#__PURE__*/React.createElement(CardDescriptionContent, {
61
+ title: BUNDLE_CARD_AUTHOR,
62
+ subtitle: author ?? ''
63
+ }), /*#__PURE__*/React.createElement(CardDescriptionContent, {
64
+ title: BUNDLE_APPLIED_TEXT,
65
+ subtitle: isApplied && metaState !== null && metaState !== void 0 && metaState.switchState ? SWITCH_STATE_KEYS.Enabled : SWITCH_STATE_KEYS.Disabled
66
+ }), /*#__PURE__*/React.createElement(CardDescriptionContent, {
67
+ title: BUCKET_CARD_TEXTS.UPDATED,
68
+ subtitle: updatedAtText
69
+ })));
70
+ };
71
+ export default BundleCardInfoSection;
72
+ //# sourceMappingURL=BundleCardInfoSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useCallback","useContext","useMemo","Text","View","GlobalContext","CardDescriptionContent","parseDateTime","BUCKET_CARD_TEXTS","BUNDLE_APPLIED_TEXT","BUNDLE_CARD_AUTHOR","BUNDLE_CARD_RELEASE_NOTE","DOWNLOADED_TEXT","DOWNLOAD_BUTTON_TEXT","NO_RELEASE_NOTE_TEXT","SWITCH_STATE_KEYS","COLORS","styles","BundleCardInfoSection","_ref","version","description","updatedAt","author","isApplied","metaState","bundleState","selectedBucketId","actions","downloadBundle","stateColor","switchState","orange","green","blue","updatedAtText","handleDownloadPress","createElement","style","container","rowContainer","titleText","bold","onPress","appliedText","color","Fragment","releaseNoteText","releaseNoteDescriptionText","divider","title","subtitle","Enabled","Disabled","UPDATED"],"sourceRoot":"../../../../../../../src","sources":["main/components/modules/listing/components/BundleCardInfoSection.tsx"],"mappings":"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"}