manage-app-sdk 0.0.2

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 (133) hide show
  1. package/README.md +2 -0
  2. package/dist/Constants/Home.js +85 -0
  3. package/dist/assets/AppConstant.js +293 -0
  4. package/dist/assets/androidResources/Connectivity.java +52 -0
  5. package/dist/assets/androidResources/ConnectivityPackage.java +25 -0
  6. package/dist/assets/fonts/VoltePlay-Bold.ttf +0 -0
  7. package/dist/assets/fonts/VoltePlay-Light.ttf +0 -0
  8. package/dist/assets/fonts/VoltePlay-Medium.ttf +0 -0
  9. package/dist/assets/fonts/VoltePlay-Regular.ttf +0 -0
  10. package/dist/assets/fonts/VoltePlay-SemiBold.ttf +0 -0
  11. package/dist/assets/gif/loader.gif +0 -0
  12. package/dist/assets/images/PartnerLogosSmall.png +0 -0
  13. package/dist/assets/images/Union.png +0 -0
  14. package/dist/assets/images/appIcon.png +0 -0
  15. package/dist/assets/images/desktop-alert.png +0 -0
  16. package/dist/assets/images/desktop-cross.png +0 -0
  17. package/dist/assets/images/mobile-bg.png +0 -0
  18. package/dist/assets/images/stepper-one-small.png +0 -0
  19. package/dist/assets/images/stepper-one.png +0 -0
  20. package/dist/assets/images/stepper-two-small.png +0 -0
  21. package/dist/assets/images/stepper-two.png +0 -0
  22. package/dist/assets/images/tablet-bg.png +0 -0
  23. package/dist/assets/png/Tataplay-Binge.png +0 -0
  24. package/dist/assets/png/arrowBack.png +0 -0
  25. package/dist/assets/png/backArrowPng.png +0 -0
  26. package/dist/assets/svg/BingeLogoSvg.js +44 -0
  27. package/dist/assets/svg/CrossSvg.js +32 -0
  28. package/dist/assets/svg/OfferSvg.js +31 -0
  29. package/dist/assets/svg/PlansSvg.js +75 -0
  30. package/dist/assets/svg/TickSvg.js +28 -0
  31. package/dist/assets/svg/arrowBack.js +27 -0
  32. package/dist/assets/svg/arrowSvg.js +31 -0
  33. package/dist/components/AppIcon/AppIcon.js +70 -0
  34. package/dist/components/AppleBanner/AppleMusicBanner.js +36 -0
  35. package/dist/components/AppleBanner/AppleMusicBannerStyles.js +32 -0
  36. package/dist/components/AppleBanner/AppleMusicBlackBanner.js +66 -0
  37. package/dist/components/AppsContainer/AppsContainer.js +112 -0
  38. package/dist/components/BottomSheet/BottomSheet.js +173 -0
  39. package/dist/components/BottomSheet/BottomSheetStyles.js +48 -0
  40. package/dist/components/Buttons/PrimaryButton/PrimaryButton.js +50 -0
  41. package/dist/components/Buttons/RadioButton/RadioButton.js +24 -0
  42. package/dist/components/Buttons/TextButton/TextButton.js +44 -0
  43. package/dist/components/CheckButton/CheckButton.js +36 -0
  44. package/dist/components/CommonModal/CommonModel.js +79 -0
  45. package/dist/components/CommonModal/ModalTypes.js +10 -0
  46. package/dist/components/Confetti/ConfettiBurst.js +120 -0
  47. package/dist/components/Confetti/FallingConfetti.js +190 -0
  48. package/dist/components/Confetti/MultiConfettiBurst.js +73 -0
  49. package/dist/components/Coupon/CouponCard.js +47 -0
  50. package/dist/components/Coupon/CouponStyles.js +54 -0
  51. package/dist/components/Footer/Footer.js +177 -0
  52. package/dist/components/Footer/MServiceFooter/MServiceFooter.js +103 -0
  53. package/dist/components/Footer/OnButtonFooter/OneButtonFooter.js +65 -0
  54. package/dist/components/Footer/PlanSummaryFooter/SummaryFooter.js +180 -0
  55. package/dist/components/Footer/PrimeAoFooter/PrimeAoFooter.js +193 -0
  56. package/dist/components/Footer/UpgradeFooter/UpgradeFooter.js +89 -0
  57. package/dist/components/Footer/UpgradeFooter/styles.js +73 -0
  58. package/dist/components/GradientBorderContainer/GradientBorderContainer.js +79 -0
  59. package/dist/components/GradientText/GradientText.js +60 -0
  60. package/dist/components/Header/ManageAppHeader.js +71 -0
  61. package/dist/components/HighlightedText/HighlightedText.js +53 -0
  62. package/dist/components/Input/OtpInput.js +105 -0
  63. package/dist/components/Loader/Loader.js +39 -0
  64. package/dist/components/MServicePaymentMethod/MServicePaymentMethod.js +395 -0
  65. package/dist/components/MicroDrama/MicroDramaBanner.js +67 -0
  66. package/dist/components/MicroDrama/MicroDramaCard.js +33 -0
  67. package/dist/components/MicroDrama/styles.js +29 -0
  68. package/dist/components/OfferCard/OfferCard.js +100 -0
  69. package/dist/components/PaymentMethod/PaymentMethod.js +370 -0
  70. package/dist/components/Plan/CurrentPlanCard.js +138 -0
  71. package/dist/components/Plan/PlanCard.js +268 -0
  72. package/dist/components/Plan/PlanCardStyles.js +371 -0
  73. package/dist/components/Plan/RenderAppIcons.js +115 -0
  74. package/dist/components/Plan/SpecialPlanCard.js +272 -0
  75. package/dist/components/PopUps/CancelPopUp/CancelPopUp.js +190 -0
  76. package/dist/components/PopUps/ConfettiAnimation.js +172 -0
  77. package/dist/components/PopUps/ConfettiBurst.js +142 -0
  78. package/dist/components/PopUps/CouponPopUp/CouponPopUp.js +185 -0
  79. package/dist/components/PopUps/ErrorMsgPopup/ErrorMsgPopup.js +104 -0
  80. package/dist/components/PopUps/InternetErrorPopUp/InternetErrorPopUp.js +122 -0
  81. package/dist/components/PopUps/MServicePopUp/MServicePopUp.js +155 -0
  82. package/dist/components/PopUps/MpinPopUp/MpinPopUp.js +193 -0
  83. package/dist/components/PopUps/OtpPopup/OtpPopup.js +345 -0
  84. package/dist/components/PopUps/PlanCancelledPopUp/PlanCancelledPopUp.js +183 -0
  85. package/dist/components/PopUps/PlanDetailPopup/PlanDetailPopup.js +121 -0
  86. package/dist/components/PopUps/PopUp/PopUp.js +171 -0
  87. package/dist/components/PrimeAddOn/PrimeAddOn.js +72 -0
  88. package/dist/components/PrimeAddOn/PrimeAddOnStyles.js +79 -0
  89. package/dist/components/PrimeAddOn/SummaryPage/PrimeAddOnBanner.js +109 -0
  90. package/dist/components/PrimeBanner/PrimeBanner.js +27 -0
  91. package/dist/components/PrimeBanner/PrimeBannerStyles.js +36 -0
  92. package/dist/components/SectionItem/SectionItem.js +42 -0
  93. package/dist/components/Toast/Toast.js +71 -0
  94. package/dist/components/Toast/ToastStyle.js +62 -0
  95. package/dist/navigation/Routes.js +84 -0
  96. package/dist/navigation/RoutesConstants.js +18 -0
  97. package/dist/screens/AppDiscontinue/ChooseApp.js +325 -0
  98. package/dist/screens/AppDiscontinue/styles.js +89 -0
  99. package/dist/screens/AppsReplacement/AppsReplacement.js +359 -0
  100. package/dist/screens/AppsReplacement/styles.js +92 -0
  101. package/dist/screens/ChooseYourPlan/ChooseYourPlan.js +596 -0
  102. package/dist/screens/ChooseYourPlan/ChooseYourPlanStyles.js +28 -0
  103. package/dist/screens/ChooseYourPlan/OffersCarousel.js +146 -0
  104. package/dist/screens/CreateSession/CreateSession.js +620 -0
  105. package/dist/screens/MyPlan/MyPlan.js +429 -0
  106. package/dist/screens/MyPlan/MyPlanStyles.js +227 -0
  107. package/dist/screens/PaymentStatus/PaymentStatus.js +492 -0
  108. package/dist/screens/PaymentStatus/styles.js +68 -0
  109. package/dist/screens/PlanCancellation/CancelPlan.js +127 -0
  110. package/dist/screens/PlanCancellation/InfiniteAutoScroll.js +67 -0
  111. package/dist/screens/PlanCancellation/styles.js +83 -0
  112. package/dist/screens/PlanSummary/PlanSummary.js +748 -0
  113. package/dist/screens/PlanSummary/PlanSummaryStyles.js +385 -0
  114. package/dist/screens/PrimePlanSummary/PrimePlanSummary.js +252 -0
  115. package/dist/screens/PrimePlanSummary/PrimePlanSummaryStyles.js +102 -0
  116. package/dist/screens/SelectApps/SelectApps.js +513 -0
  117. package/dist/screens/SelectApps/SelectAppsStyles.js +165 -0
  118. package/dist/screens/SplashScreen/SplashScreen.js +82 -0
  119. package/dist/services/apiCall/action.js +718 -0
  120. package/dist/services/apiCall/apiServiceUtils.js +136 -0
  121. package/dist/services/apiCall/constants.js +42 -0
  122. package/dist/services/apiCall/parser.js +92 -0
  123. package/dist/services/apiCall/reducer.js +591 -0
  124. package/dist/services/global/action.js +111 -0
  125. package/dist/services/global/commonReducer.js +97 -0
  126. package/dist/services/global/constants.js +22 -0
  127. package/dist/services/serviceCommonHandler.js +220 -0
  128. package/dist/store/configureStore.js +13 -0
  129. package/dist/store/rootReducer.js +14 -0
  130. package/dist/utils/commonUtils.js +381 -0
  131. package/dist/utils/fontUtils.js +13 -0
  132. package/dist/utils/string.js +101 -0
  133. package/package.json +53 -0
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ const PlansSvg = props => {
13
+ return /*#__PURE__*/_react.default.createElement(_reactNativeSvg.default, (0, _extends2.default)({
14
+ width: 18,
15
+ height: 14,
16
+ viewBox: "0 0 18 14",
17
+ fill: "none",
18
+ xmlns: "http://www.w3.org/2000/svg"
19
+ }, props), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
20
+ d: "M14.2316 1.10358V2.2608H16.7544V11.8978H14.2316V13.0543H17.9116V1.10358H14.2316Z",
21
+ fill: "#D6C6F4"
22
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
23
+ d: "M15.1992 9.39233H14.4282V10.9343H15.1992C15.625 10.9343 15.9702 10.5891 15.9702 10.163C15.9702 9.73751 15.625 9.39233 15.1992 9.39233Z",
24
+ fill: "#D6C6F4",
25
+ stroke: "#D6C6F4",
26
+ strokeWidth: 0.647619
27
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
28
+ d: "M15.7004 10.163C15.7002 9.88636 15.4757 9.6625 15.1991 9.6625H14.6986V10.6643H15.1991C15.4758 10.6643 15.7004 10.4398 15.7004 10.163ZM16.2399 10.163C16.2399 10.7378 15.7739 11.2038 15.1991 11.2038H14.1582V9.12213H15.1991C15.7738 9.12213 16.2397 9.5883 16.2399 10.163Z",
29
+ fill: "#D6C6F4"
30
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
31
+ d: "M3.7679 1.10358V2.2608H1.24512V11.8978H3.7679V13.0543H0.0878906V1.10358H3.7679Z",
32
+ fill: "#D6C6F4"
33
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
34
+ d: "M2.72902 9.39233H3.5V10.9343H2.72903C2.30323 10.9343 1.95805 10.5891 1.95805 10.163C1.95805 9.73751 2.30323 9.39233 2.72902 9.39233Z",
35
+ fill: "#D6C6F4",
36
+ stroke: "#D6C6F4",
37
+ strokeWidth: 0.647619
38
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
39
+ d: "M2.22786 10.163C2.22803 9.88642 2.4525 9.66256 2.72917 9.66256H3.22965V10.6643H2.72917C2.4524 10.6643 2.22786 10.4398 2.22786 10.163ZM1.68831 10.163C1.68831 10.7379 2.15434 11.2039 2.72917 11.2039H3.77002V9.12219H2.72917C2.15444 9.12219 1.68848 9.58836 1.68831 10.163Z",
40
+ fill: "#D6C6F4"
41
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M4.52002 0.333313H5.09825H12.808H13.3862V0.911544V13.2471V13.8254H12.808H5.09825H4.52002V13.2471V0.911544V0.333313ZM5.67648 1.48978V12.6689H12.2298V1.48978H5.67648Z",
45
+ fill: "#D6C6F4"
46
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
47
+ d: "M6.19482 1.85352H11.7095V2.43175H6.19482V1.85352Z",
48
+ fill: "#D6C6F4"
49
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
50
+ d: "M6.19482 3.01074H11.7095V3.58897H6.19482V3.01074Z",
51
+ fill: "#D6C6F4"
52
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
53
+ d: "M6.19482 4.168H11.7095V4.74623H6.19482V4.168Z",
54
+ fill: "#D6C6F4"
55
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
56
+ d: "M6.19482 5.32522H11.7095V5.90345H6.19482V5.32522Z",
57
+ fill: "#D6C6F4"
58
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
59
+ d: "M6.19482 6.48244H11.7095V7.06067H6.19482V6.48244Z",
60
+ fill: "#D6C6F4"
61
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
62
+ d: "M6.19482 7.63966H11.7095V8.21789H6.19482V7.63966Z",
63
+ fill: "#D6C6F4"
64
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
65
+ d: "M6.19482 8.79688H11.7095V9.37511H6.19482V8.79688Z",
66
+ fill: "#D6C6F4"
67
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
68
+ d: "M6.19482 9.9541H11.7095V10.5323H6.19482V9.9541Z",
69
+ fill: "#D6C6F4"
70
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
71
+ d: "M6.19482 11.1113H11.7095V11.6896H6.19482V11.1113Z",
72
+ fill: "#D6C6F4"
73
+ }));
74
+ };
75
+ var _default = exports.default = PlansSvg;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _reactNativeSvg = require("react-native-svg");
11
+ const TickSvg = ({
12
+ color = 'white',
13
+ style,
14
+ ...props
15
+ }) => /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Svg, (0, _extends2.default)({
16
+ width: "14",
17
+ height: "10",
18
+ viewBox: "0 0 14 10",
19
+ fill: "none",
20
+ xmlns: "http://www.w3.org/2000/svg",
21
+ style: style
22
+ }, props), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
23
+ fillRule: "evenodd",
24
+ clipRule: "evenodd",
25
+ d: "M3.00415 4.67171L5.09654 6.74974L10.9925 0.909058H13.5906L5.73911 8.68687L5.0949 9.32504L4.45151 8.68606L0.409424 4.67171H3.00415Z",
26
+ fill: color
27
+ }));
28
+ var _default = exports.default = TickSvg;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _reactNativeSvg = require("react-native-svg");
10
+ const ArrowBack = ({
11
+ color = 'white',
12
+ style,
13
+ ...props
14
+ }) => /*#__PURE__*/React.createElement(_reactNativeSvg.Svg, (0, _extends2.default)({
15
+ width: "16",
16
+ height: "16",
17
+ viewBox: "0 0 16 16",
18
+ fill: "none",
19
+ xmlns: "http://www.w3.org/2000/svg",
20
+ style: style
21
+ }, props), /*#__PURE__*/React.createElement(_reactNativeSvg.Path, {
22
+ fillRule: "evenodd",
23
+ clipRule: "evenodd",
24
+ d: "M8.41683 0.5H10.8335L3.83353 7.16667H15.5002V8.83333H3.83353L10.8335 15.5H8.41683L1.17549 8.60345L0.54187 8L1.17549 7.39655L8.41683 0.5Z",
25
+ fill: color
26
+ }));
27
+ var _default = exports.default = ArrowBack;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _reactNativeSvg = require("react-native-svg");
10
+ var _AppConstant = require("../AppConstant");
11
+ const ratio = _AppConstant.AppConstant.dimension.aspectRatio;
12
+ const ArrowSvg = ({
13
+ color = "white",
14
+ style,
15
+ width = 10,
16
+ height = 6,
17
+ ...props
18
+ }) => /*#__PURE__*/React.createElement(_reactNativeSvg.Svg, (0, _extends2.default)({
19
+ width: width * ratio,
20
+ height: height * ratio,
21
+ viewBox: "0 0 10 6",
22
+ fill: "none",
23
+ xmlns: "http://www.w3.org/2000/svg",
24
+ style: style
25
+ }, props), /*#__PURE__*/React.createElement(_reactNativeSvg.Path, {
26
+ fillRule: "evenodd",
27
+ clipRule: "evenodd",
28
+ d: "M4.9999 5.21411L0.658583 1.69413C0.292085 1.39697 0.292085 0.8378 0.658583 0.540639C0.931165 0.319627 1.32126 0.319627 1.59384 0.540639L4.9999 3.3023L8.40595 0.54064C8.67853 0.319627 9.06863 0.319627 9.34121 0.540639C9.70771 0.8378 9.70771 1.39697 9.34121 1.69413L4.9999 5.21411Z",
29
+ fill: color
30
+ }));
31
+ var _default = exports.default = ArrowSvg;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _reactNative = require("react-native");
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _serviceCommonHandler = require("../../services/serviceCommonHandler");
11
+ var _AppConstant = require("../../assets/AppConstant");
12
+ var _lodash = require("lodash");
13
+ var _fontUtils = require("../../utils/fontUtils");
14
+ const ratio = _AppConstant.AppConstant.dimension.aspectRatio;
15
+ const AppIcon = ({
16
+ appId,
17
+ appName,
18
+ width = 46,
19
+ height = 46,
20
+ style = {},
21
+ iconStyle = {}
22
+ }) => {
23
+ const uri = _serviceCommonHandler.serviceConsts.baseUrls.imageBaseUrl + appId + ".webp";
24
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
25
+ style: [styles.iconContainer, style]
26
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
27
+ style: [styles.appIconWrapper, {
28
+ width: width * ratio,
29
+ height: height * ratio
30
+ }, iconStyle]
31
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
32
+ key: appId,
33
+ source: {
34
+ uri: uri
35
+ },
36
+ style: styles.appIcon,
37
+ resizeMode: "contain"
38
+ })), !(0, _lodash.isEmpty)(appName) && /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
39
+ style: styles.appName
40
+ }, appName));
41
+ };
42
+ var _default = exports.default = AppIcon;
43
+ const styles = _reactNative.StyleSheet.create({
44
+ iconContainer: {
45
+ alignItems: "center"
46
+ },
47
+ appIconWrapper: {
48
+ width: 46 * ratio,
49
+ height: 46 * ratio,
50
+ overflow: "hidden",
51
+ justifyContent: "center",
52
+ alignItems: "center",
53
+ borderRadius: 4 * ratio
54
+ },
55
+ appIcon: {
56
+ width: "100%",
57
+ height: "100%",
58
+ resizeMode: "contain"
59
+ },
60
+ appName: {
61
+ fontSize: (0, _AppConstant.normalizeFont)(10),
62
+ lineHeight: (0, _AppConstant.normalizeFont)(10),
63
+ fontFamily: _fontUtils.FONTS.Medium,
64
+ color: "#C7C0CF",
65
+ marginTop: 6 * ratio,
66
+ marginBottom: 2 * ratio,
67
+ textAlign: "center",
68
+ width: "100%"
69
+ }
70
+ });
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _reactNative = require("react-native");
9
+ var _AppleMusicBannerStyles = _interopRequireDefault(require("./AppleMusicBannerStyles"));
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var _OfferCard = _interopRequireDefault(require("../OfferCard/OfferCard"));
12
+ var _HighlightedText = _interopRequireDefault(require("../HighlightedText/HighlightedText"));
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
+ const AppleMusicBanner = ({
15
+ pageData
16
+ }) => {
17
+ const appleMusicData = (0, _react.useMemo)(() => {
18
+ var _pageData$desc;
19
+ return pageData === null || pageData === void 0 || (_pageData$desc = pageData.desc) === null || _pageData$desc === void 0 ? void 0 : _pageData$desc.match(/<span>(.*?)<\/span>(.*)/);
20
+ }, [pageData === null || pageData === void 0 ? void 0 : pageData.desc]);
21
+ return /*#__PURE__*/_react.default.createElement(_OfferCard.default, null, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
22
+ source: {
23
+ uri: pageData === null || pageData === void 0 ? void 0 : pageData.img
24
+ },
25
+ style: _AppleMusicBannerStyles.default.image
26
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
27
+ numberOfLines: 2,
28
+ style: _AppleMusicBannerStyles.default.appleTitle
29
+ }, /*#__PURE__*/_react.default.createElement(_HighlightedText.default, {
30
+ color: "#6b00dd",
31
+ style: _AppleMusicBannerStyles.default.boldText
32
+ }, appleMusicData[1]), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
33
+ style: _AppleMusicBannerStyles.default.appleDesc
34
+ }, appleMusicData[2])));
35
+ };
36
+ var _default = exports.default = AppleMusicBanner;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _AppConstant = require("../../assets/AppConstant");
9
+ var _fontUtils = require("../../utils/fontUtils");
10
+ var _commonUtils = require("../../utils/commonUtils");
11
+ const ratio = _AppConstant.AppConstant.dimension.aspectRatio;
12
+ var _default = exports.default = AppleMusicBannerStyles = _reactNative.StyleSheet.create({
13
+ appleTitle: {
14
+ fontSize: (0, _AppConstant.normalizeFont)(14),
15
+ fontFamily: _fontUtils.FONTS.SemiBold,
16
+ paddingHorizontal: 8 * ratio,
17
+ flexWrap: "wrap",
18
+ paddingEnd: 50 * ratio
19
+ },
20
+ image: {
21
+ width: 30 * ratio,
22
+ height: 30 * ratio,
23
+ marginLeft: 8 * ratio
24
+ },
25
+ appleDesc: {
26
+ fontFamily: _fontUtils.FONTS.Medium
27
+ },
28
+ boldText: {
29
+ fontSize: (0, _AppConstant.normalizeFont)(15),
30
+ fontFamily: _fontUtils.FONTS.SemiBold
31
+ }
32
+ });
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _AppConstant = require("../../assets/AppConstant");
10
+ var _fontUtils = require("../../utils/fontUtils");
11
+ var _commonUtils = require("../../utils/commonUtils");
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ const AppleMusicBlackBanner = ({
14
+ pageData
15
+ }) => {
16
+ const appleMusicData = (0, _react.useMemo)(() => {
17
+ var _pageData$desc;
18
+ return pageData === null || pageData === void 0 || (_pageData$desc = pageData.desc) === null || _pageData$desc === void 0 ? void 0 : _pageData$desc.match(/<span>(.*?)<\/span>(.*)/);
19
+ }, [pageData === null || pageData === void 0 ? void 0 : pageData.desc]);
20
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
21
+ style: styles.container
22
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
23
+ source: {
24
+ uri: pageData === null || pageData === void 0 ? void 0 : pageData.img
25
+ },
26
+ style: styles.image
27
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
28
+ numberOfLines: 2,
29
+ style: styles.appleTitle
30
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, appleMusicData[1]), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
31
+ style: styles.appleDesc
32
+ }, appleMusicData[2])));
33
+ };
34
+ var _default = exports.default = /*#__PURE__*/_react.default.memo(AppleMusicBlackBanner);
35
+ const ratio = _AppConstant.AppConstant.dimension.aspectRatio;
36
+ const styles = _reactNative.StyleSheet.create({
37
+ container: {
38
+ width: ratio * ((0, _commonUtils.isTablet)() ? 400 : 320),
39
+ borderRadius: 10 * ratio,
40
+ flexDirection: "row",
41
+ marginTop: 10 * ratio,
42
+ marginRight: 12 * ratio,
43
+ alignItems: "center",
44
+ marginLeft: 12 * ratio
45
+ },
46
+ appleTitle: {
47
+ fontSize: (0, _AppConstant.normalizeFont)(14),
48
+ fontFamily: _fontUtils.FONTS.SemiBold,
49
+ paddingHorizontal: 8 * ratio,
50
+ flexWrap: "wrap",
51
+ paddingEnd: 25 * ratio,
52
+ color: "#F7F1FF"
53
+ },
54
+ image: {
55
+ width: 30 * ratio,
56
+ height: 30 * ratio,
57
+ marginLeft: 8 * ratio
58
+ },
59
+ appleDesc: {
60
+ fontFamily: _fontUtils.FONTS.Medium
61
+ },
62
+ image: {
63
+ width: 24 * ratio,
64
+ height: 24 * ratio
65
+ }
66
+ });
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _reactNative = require("react-native");
10
+ var _AppConstant = require("../../assets/AppConstant");
11
+ var _AppIcon = _interopRequireDefault(require("../AppIcon/AppIcon"));
12
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
+ /**
15
+ * This component displays apps like in regional card like if total apps are 6 then 3 in one row and the rest
16
+ * 3 in another row, if total apps are 7 then 4 apps in top row and the rest 3 apps in the row below it
17
+ */
18
+
19
+ const ratio = _AppConstant.AppConstant.dimension.aspectRatio;
20
+ const AppIconsGrid = ({
21
+ appList = [],
22
+ iconWidth = 56,
23
+ iconHeight = 56
24
+ }) => {
25
+ const {
26
+ rows,
27
+ isDefault = false
28
+ } = (0, _react.useMemo)(() => {
29
+ if (!(appList !== null && appList !== void 0 && appList.length)) return [];
30
+ const topApps = appList === null || appList === void 0 ? void 0 : appList.filter(app => app.topApps);
31
+ const nonTopApps = appList === null || appList === void 0 ? void 0 : appList.filter(app => !app.topApps);
32
+ const combinedApps = [...topApps, ...nonTopApps];
33
+ if (!(combinedApps !== null && combinedApps !== void 0 && combinedApps.length)) return [];
34
+ switch (combinedApps.length) {
35
+ case 4:
36
+ return {
37
+ rows: [combinedApps]
38
+ };
39
+ case 5:
40
+ case 6:
41
+ return {
42
+ rows: [combinedApps.slice(0, 3), combinedApps.slice(3)]
43
+ };
44
+ case 7:
45
+ case 8:
46
+ return {
47
+ rows: [combinedApps.slice(0, 4), combinedApps.slice(4)]
48
+ };
49
+ default:
50
+ {
51
+ const displayApps = combinedApps;
52
+ return {
53
+ rows: [displayApps],
54
+ isDefault: true
55
+ };
56
+ }
57
+ }
58
+ }, [appList]);
59
+ if (!(rows !== null && rows !== void 0 && rows.length)) return null;
60
+ return /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
61
+ entering: _reactNativeReanimated.FadeIn.duration(120),
62
+ exiting: _reactNativeReanimated.FadeOut.duration(120),
63
+ style: styles.appIconsContainer
64
+ }, rows.map((row, rowIndex) => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
65
+ key: rowIndex,
66
+ style: [styles.appIconsRow, !isDefault && {
67
+ justifyContent: "center"
68
+ }]
69
+ }, row.map(item => /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
70
+ key: item.appId,
71
+ style: styles.appIconWrapper,
72
+ entering: _reactNativeReanimated.FadeIn.duration(120),
73
+ exiting: _reactNativeReanimated.FadeOut.duration(120)
74
+ }, /*#__PURE__*/_react.default.createElement(_AppIcon.default, {
75
+ appId: item.appId,
76
+ width: iconWidth,
77
+ height: iconHeight
78
+ }))))));
79
+ };
80
+ var _default = exports.default = /*#__PURE__*/_react.default.memo(AppIconsGrid);
81
+ const styles = _reactNative.StyleSheet.create({
82
+ appIconsContainer: {
83
+ width: "100%",
84
+ justifyContent: "center",
85
+ alignItems: "center"
86
+ },
87
+ appIconsRow: {
88
+ // width: "100%",
89
+ flexDirection: "row",
90
+ // justifyContent: "center",
91
+ alignItems: "center",
92
+ flexWrap: "wrap",
93
+ columnGap: 11.57 * ratio
94
+ },
95
+ appIconWrapper: {
96
+ // marginHorizontal: 6 * ratio,
97
+ marginVertical: 6 * ratio,
98
+ justifyContent: "center",
99
+ alignItems: "center",
100
+ borderRadius: 4 * ratio,
101
+ overflow: "hidden"
102
+ },
103
+ appIcon: {
104
+ width: "100%",
105
+ height: "100%",
106
+ resizeMode: "contain"
107
+ },
108
+ centeredRow: {
109
+ justifyContent: "center",
110
+ alignItems: "center"
111
+ }
112
+ });
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _reactNative = require("react-native");
11
+ var _reactNativeLinearGradient = _interopRequireDefault(require("react-native-linear-gradient"));
12
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
13
+ var _AppConstant = require("../../assets/AppConstant");
14
+ var _BottomSheetStyles = _interopRequireDefault(require("./BottomSheetStyles"));
15
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
+ const SCREEN_HEIGHT = _AppConstant.AppConstant.dimension.height;
17
+ const BottomSheet = ({
18
+ backgroundGradientColors = ["#220046", "#020005"],
19
+ isVisible,
20
+ onClose,
21
+ heightPercentage = 60,
22
+ children,
23
+ snapPoints,
24
+ backgroundColor = "white",
25
+ enablePanGesture = true,
26
+ animationDuration = 500,
27
+ backdrop = true,
28
+ style,
29
+ adaptToContentHeight = true,
30
+ maxHeightPercentage = 80
31
+ }) => {
32
+ const translateY = (0, _reactNativeReanimated.useSharedValue)(SCREEN_HEIGHT);
33
+ const opacity = (0, _reactNativeReanimated.useSharedValue)(0);
34
+ const [contentHeight, setContentHeight] = (0, _react.useState)(null);
35
+
36
+ // Calculate sheet height based on adaptToContentHeight
37
+ const calculatedHeight = SCREEN_HEIGHT * heightPercentage / 100;
38
+ const maxHeight = SCREEN_HEIGHT * maxHeightPercentage / 100;
39
+ let sheetHeight;
40
+ if (adaptToContentHeight && contentHeight) {
41
+ // Use content height but cap it at maxHeight
42
+ sheetHeight = Math.min(contentHeight, maxHeight);
43
+ } else {
44
+ sheetHeight = calculatedHeight;
45
+ }
46
+ const snapPointHeights = snapPoints === null || snapPoints === void 0 ? void 0 : snapPoints.map(p => SCREEN_HEIGHT * p / 100);
47
+
48
+ // Open / close animation
49
+ (0, _react.useEffect)(() => {
50
+ if (isVisible) {
51
+ opacity.value = (0, _reactNativeReanimated.withTiming)(0.5, {
52
+ duration: animationDuration
53
+ });
54
+ translateY.value = (0, _reactNativeReanimated.withTiming)(0, {
55
+ duration: animationDuration
56
+ });
57
+ } else {
58
+ opacity.value = (0, _reactNativeReanimated.withTiming)(0, {
59
+ duration: animationDuration
60
+ });
61
+ translateY.value = (0, _reactNativeReanimated.withTiming)(SCREEN_HEIGHT, {
62
+ duration: animationDuration
63
+ }, finished => {
64
+ if (finished) (0, _reactNativeReanimated.runOnJS)(onClose)(false);
65
+ });
66
+ }
67
+ }, [isVisible, sheetHeight]);
68
+
69
+ // Pan gesture
70
+ const panResponder = _reactNative.PanResponder.create({
71
+ onStartShouldSetPanResponder: () => enablePanGesture,
72
+ onMoveShouldSetPanResponder: () => enablePanGesture,
73
+ onPanResponderMove: (_, gesture) => {
74
+ const newY = gesture.dy;
75
+ if (newY >= 0) {
76
+ translateY.value = newY;
77
+ }
78
+ },
79
+ onPanResponderRelease: (_, gesture) => {
80
+ const threshold = sheetHeight * 0.3;
81
+ if (gesture.dy > threshold || gesture.vy > 0.5) {
82
+ // Animate close
83
+ opacity.value = (0, _reactNativeReanimated.withTiming)(0, {
84
+ duration: animationDuration
85
+ });
86
+ translateY.value = (0, _reactNativeReanimated.withTiming)(SCREEN_HEIGHT, {
87
+ duration: animationDuration
88
+ }, finished => {
89
+ if (finished) (0, _reactNativeReanimated.runOnJS)(onClose)();
90
+ });
91
+ } else {
92
+ // Snap back
93
+ if (snapPointHeights !== null && snapPointHeights !== void 0 && snapPointHeights.length) {
94
+ const distances = snapPointHeights.map(h => Math.abs(translateY.value - (SCREEN_HEIGHT - h)));
95
+ const nearestIndex = distances.indexOf(Math.min(...distances));
96
+ translateY.value = (0, _reactNativeReanimated.withTiming)(SCREEN_HEIGHT - snapPointHeights[nearestIndex], {
97
+ duration: animationDuration
98
+ });
99
+ } else {
100
+ translateY.value = (0, _reactNativeReanimated.withTiming)(0, {
101
+ duration: animationDuration
102
+ });
103
+ }
104
+ }
105
+ }
106
+ });
107
+ const animatedSheetStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
108
+ transform: [{
109
+ translateY: translateY.value
110
+ }]
111
+ }));
112
+ const animatedBackdropStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
113
+ opacity: opacity.value
114
+ }));
115
+ const handleClose = () => {
116
+ opacity.value = (0, _reactNativeReanimated.withTiming)(0, {
117
+ duration: animationDuration
118
+ });
119
+ translateY.value = (0, _reactNativeReanimated.withTiming)(SCREEN_HEIGHT, {
120
+ duration: animationDuration
121
+ }, finished => {
122
+ if (finished) (0, _reactNativeReanimated.runOnJS)(onClose)();
123
+ });
124
+ };
125
+
126
+ // Handle content layout measurement
127
+ const handleContentLayout = event => {
128
+ if (adaptToContentHeight) {
129
+ const {
130
+ height
131
+ } = event.nativeEvent.layout;
132
+ // Add some padding for handle and margins
133
+ const totalHeight = height + 55;
134
+ setContentHeight(totalHeight);
135
+ }
136
+ };
137
+ return /*#__PURE__*/_react.default.createElement(_reactNative.KeyboardAvoidingView, {
138
+ behavior: _reactNative.Platform.OS === "ios" ? "padding" : "height",
139
+ style: _BottomSheetStyles.default.wrapper,
140
+ pointerEvents: isVisible ? "auto" : "none"
141
+ }, backdrop && /*#__PURE__*/_react.default.createElement(_reactNative.TouchableWithoutFeedback, {
142
+ onPress: handleClose
143
+ }, /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
144
+ style: [_BottomSheetStyles.default.backdrop, animatedBackdropStyle]
145
+ })), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, (0, _extends2.default)({
146
+ style: [_BottomSheetStyles.default.sheet, {
147
+ height: adaptToContentHeight && !contentHeight ? "auto" : sheetHeight,
148
+ backgroundColor,
149
+ bottom: 0
150
+ }, style, animatedSheetStyle]
151
+ }, enablePanGesture ? panResponder.panHandlers : {}), /*#__PURE__*/_react.default.createElement(_reactNativeLinearGradient.default, {
152
+ colors: backgroundGradientColors,
153
+ start: {
154
+ x: 0,
155
+ y: 0
156
+ },
157
+ end: {
158
+ x: 1,
159
+ y: 0
160
+ },
161
+ style: _reactNative.StyleSheet.absoluteFill
162
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
163
+ style: _BottomSheetStyles.default.handleContainer
164
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
165
+ style: _BottomSheetStyles.default.handle
166
+ })), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
167
+ style: [_BottomSheetStyles.default.content],
168
+ onLayout: handleContentLayout
169
+ }, children({
170
+ requestClose: handleClose
171
+ }))));
172
+ };
173
+ var _default = exports.default = BottomSheet;