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,47 @@
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 = _interopRequireWildcard(require("react"));
10
+ var _CouponStyles = _interopRequireDefault(require("./CouponStyles"));
11
+ var _string = require("../../utils/string");
12
+ var _OfferCard = _interopRequireDefault(require("../OfferCard/OfferCard"));
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 CouponCard = ({
15
+ couponDetails,
16
+ drupal
17
+ }) => {
18
+ if (couponDetails == null || Array.isArray(couponDetails) || typeof couponDetails !== "object") {
19
+ return null;
20
+ }
21
+ console.log("COUPON", couponDetails);
22
+ const congratsDetailArr = (0, _react.useMemo)(() => {
23
+ if (!(drupal !== null && drupal !== void 0 && drupal.congratsDetail)) return ["", ""];
24
+ const str = (0, _string.splitHtmlString)(drupal === null || drupal === void 0 ? void 0 : drupal.congratsDetail);
25
+ return [str[0] + " ", (0, _string.replacePlaceholderInString)(str[1], "percentage", couponDetails === null || couponDetails === void 0 ? void 0 : couponDetails.amountDiscount) + " "];
26
+ }, [drupal === null || drupal === void 0 ? void 0 : drupal.congratsDetail, couponDetails]);
27
+ const sale_tenureSelectText = (0, _string.splitHtmlString)(drupal === null || drupal === void 0 ? void 0 : drupal.saleTag);
28
+ return /*#__PURE__*/_react.default.createElement(_OfferCard.default, null, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
29
+ source: {
30
+ uri: drupal === null || drupal === void 0 ? void 0 : drupal.congoImg
31
+ },
32
+ style: _CouponStyles.default.confetti
33
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
34
+ style: _CouponStyles.default.couponSubheadingContainer
35
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
36
+ style: _CouponStyles.default.couponSubheading
37
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
38
+ style: _CouponStyles.default.subHeading
39
+ }, congratsDetailArr[0], /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
40
+ style: [_CouponStyles.default.percentageText]
41
+ }, congratsDetailArr[1]), ["Monthly", "2 Months"].includes(couponDetails === null || couponDetails === void 0 ? void 0 : couponDetails.tenure) ? drupal === null || drupal === void 0 ? void 0 : drupal.onTenureSelect : /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, sale_tenureSelectText[0], " ", /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
42
+ style: _CouponStyles.default.lineThrough
43
+ }, sale_tenureSelectText[1]), " ", sale_tenureSelectText[2]))), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
44
+ style: _CouponStyles.default.validityText
45
+ }, ["Monthly", "2 Months"].includes(couponDetails === null || couponDetails === void 0 ? void 0 : couponDetails.tenure) ? drupal === null || drupal === void 0 ? void 0 : drupal.offerValid : drupal === null || drupal === void 0 ? void 0 : drupal.tenureTag)));
46
+ };
47
+ var _default = exports.default = CouponCard;
@@ -0,0 +1,54 @@
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
+ const ratio = _AppConstant.AppConstant.dimension.aspectRatio;
11
+ var _default = exports.default = CouponStyles = _reactNative.StyleSheet.create({
12
+ heading: {
13
+ fontSize: (0, _AppConstant.normalizeFont)(14),
14
+ color: "black",
15
+ marginVertical: ratio * 4,
16
+ marginLeft: 2 * ratio,
17
+ fontFamily: _fontUtils.FONTS.SemiBold
18
+ },
19
+ subHeading: {
20
+ fontSize: (0, _AppConstant.normalizeFont)(14),
21
+ color: "#474545ff",
22
+ fontFamily: _fontUtils.FONTS.Medium,
23
+ flexWrap: "wrap",
24
+ paddingEnd: 20 * ratio,
25
+ lineHeight: 17 * ratio
26
+ },
27
+ validityText: {
28
+ color: "#8E81A1",
29
+ fontSize: (0, _AppConstant.normalizeFont)(11),
30
+ fontFamily: _fontUtils.FONTS.Medium,
31
+ marginTop: 5 * ratio
32
+ },
33
+ confetti: {
34
+ width: 30 * ratio,
35
+ height: 30 * ratio
36
+ },
37
+ percentageText: {
38
+ fontFamily: _fontUtils.FONTS.SemiBold,
39
+ color: "#6B00DD"
40
+ },
41
+ couponSubheading: {
42
+ flexDirection: "row"
43
+ },
44
+ couponSubheadingContainer: {
45
+ margin: 4 * ratio,
46
+ paddingStart: 5 * ratio,
47
+ paddingEnd: 10 * ratio,
48
+ height: "100%",
49
+ justifyContent: "space-around"
50
+ },
51
+ lineThrough: {
52
+ textDecorationLine: "line-through"
53
+ }
54
+ });
@@ -0,0 +1,177 @@
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 _reactNativeSafeAreaContext = require("react-native-safe-area-context");
10
+ var _PrimaryButton = _interopRequireDefault(require("../Buttons/PrimaryButton/PrimaryButton"));
11
+ var _AppConstant = require("../../assets/AppConstant");
12
+ var _serviceCommonHandler = require("../../services/serviceCommonHandler");
13
+ var _string = require("../../utils/string");
14
+ var _reactNativeLinearGradient = require("react-native-linear-gradient");
15
+ var _fontUtils = require("../../utils/fontUtils");
16
+ var _react = require("react");
17
+ var _lodash = require("lodash");
18
+ var _Home = require("../../Constants/Home");
19
+ const Footer = ({
20
+ pageData,
21
+ packData,
22
+ selectedCount,
23
+ maxSelectableCount,
24
+ buttonText,
25
+ onButtonClick,
26
+ isButtonEnabled = true,
27
+ showCoupon = true,
28
+ onViewMoreClick = null,
29
+ style
30
+ }) => {
31
+ const finalPrice = packData === null || packData === void 0 ? void 0 : packData.selectedDiscountedPrice;
32
+ const originalPrice = packData === null || packData === void 0 ? void 0 : packData.selectedPackPrice;
33
+ const tenure = _Home.tenureConstants[packData === null || packData === void 0 ? void 0 : packData.selectedPackTenure];
34
+ const couponOfferName = packData === null || packData === void 0 ? void 0 : packData.selectedOfferName;
35
+ const couponName = (0, _react.useMemo)(() => {
36
+ return (0, _string.replacePlaceholderInString)(pageData === null || pageData === void 0 ? void 0 : pageData.discountDetail, ["offerName", "percentage"], [couponOfferName, packData === null || packData === void 0 ? void 0 : packData.selectedAmtVal]);
37
+ }, [pageData, couponOfferName]);
38
+ const couponTenure = (0, _react.useMemo)(() => {
39
+ if ((0, _lodash.isEmpty)(packData === null || packData === void 0 ? void 0 : packData.couponTenure)) return "";
40
+ return (0, _string.replacePlaceholderInString)(pageData === null || pageData === void 0 ? void 0 : pageData.discountDetail2, "tenure", _Home.bingeOfferTenure[packData === null || packData === void 0 ? void 0 : packData.couponTenure]);
41
+ }, [pageData, packData === null || packData === void 0 ? void 0 : packData.couponTenure]);
42
+ return /*#__PURE__*/React.createElement(_reactNativeLinearGradient.LinearGradient, {
43
+ colors: ["#220046", "#020005"],
44
+ start: {
45
+ x: 0,
46
+ y: 0
47
+ },
48
+ end: {
49
+ x: 1,
50
+ y: 0
51
+ },
52
+ style: [styles.container, style]
53
+ }, /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
54
+ edges: ["bottom"],
55
+ style: styles.mainContainer
56
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
57
+ style: styles.footerDetailsAndBtnContainer
58
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
59
+ style: styles.textContainer
60
+ }, maxSelectableCount != null && /*#__PURE__*/React.createElement(_reactNative.Text, {
61
+ style: styles.selectionCount
62
+ }, `${selectedCount} of ${maxSelectableCount} selected`), /*#__PURE__*/React.createElement(_reactNative.Text, null, originalPrice && finalPrice && /*#__PURE__*/React.createElement(_reactNative.Text, null, /*#__PURE__*/React.createElement(_reactNative.Text, {
63
+ style: styles.originalPrice
64
+ }, "\u20B9", originalPrice), /*#__PURE__*/React.createElement(_reactNative.Text, {
65
+ style: styles.priceText
66
+ }, " \u20B9", finalPrice)), !couponOfferName && /*#__PURE__*/React.createElement(_reactNative.Text, {
67
+ style: styles.priceText
68
+ }, " \u20B9", finalPrice || originalPrice), !(0, _lodash.isEmpty)(tenure) && /*#__PURE__*/React.createElement(_reactNative.Text, {
69
+ style: styles.tenure
70
+ }, " for ", tenure))), /*#__PURE__*/React.createElement(_PrimaryButton.default, {
71
+ title: buttonText,
72
+ onPress: onButtonClick,
73
+ style: {
74
+ width: 120 * ratio
75
+ },
76
+ disabled: !isButtonEnabled
77
+ })), couponOfferName && showCoupon && /*#__PURE__*/React.createElement(_reactNative.View, {
78
+ style: styles.couponDetailsContainer
79
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
80
+ style: styles.couponContainer
81
+ }, /*#__PURE__*/React.createElement(_reactNative.Image, {
82
+ source: {
83
+ uri: _serviceCommonHandler.serviceConsts.baseUrls.imageBaseUrl + "disImg.png"
84
+ },
85
+ style: styles.couponImage
86
+ }), /*#__PURE__*/React.createElement(_reactNative.Text, {
87
+ style: styles.couponText
88
+ }, couponName), couponTenure && /*#__PURE__*/React.createElement(_reactNative.Text, {
89
+ style: styles.discountDetail2
90
+ }, couponTenure))), (pageData === null || pageData === void 0 ? void 0 : pageData.footerBottom) && couponOfferName && /*#__PURE__*/React.createElement(_reactNative.Text, {
91
+ style: styles.footerBottomText
92
+ }, (0, _string.replacePlaceholderInString)(pageData === null || pageData === void 0 ? void 0 : pageData.footerBottom, ["amount", "tenure"], [originalPrice, tenure]))));
93
+ };
94
+ var _default = exports.default = Footer;
95
+ const ratio = _AppConstant.AppConstant.dimension.aspectRatio;
96
+ const styles = _reactNative.StyleSheet.create({
97
+ container: {
98
+ width: "100%",
99
+ backgroundColor: "#220046",
100
+ justifyContent: "center",
101
+ alignItems: "center",
102
+ borderTopWidth: 1,
103
+ borderTopColor: "#564372"
104
+ },
105
+ mainContainer: {
106
+ paddingHorizontal: 16 * ratio,
107
+ paddingTop: 8 * ratio,
108
+ maxWidth: 400 * ratio,
109
+ alignItems: "flex-start",
110
+ paddingBottom: 5
111
+ },
112
+ footerDetailsAndBtnContainer: {
113
+ flexDirection: "row",
114
+ alignItems: "center"
115
+ },
116
+ textContainer: {
117
+ flex: 1,
118
+ gap: 8 * ratio
119
+ },
120
+ selectionCount: {
121
+ color: "white",
122
+ fontSize: (0, _AppConstant.normalizeFont)(12),
123
+ fontFamily: _fontUtils.FONTS.Medium
124
+ },
125
+ tenure: {
126
+ fontSize: (0, _AppConstant.normalizeFont)(14),
127
+ color: "white",
128
+ fontFamily: _fontUtils.FONTS.SemiBold
129
+ },
130
+ originalPrice: {
131
+ textDecorationLine: "line-through",
132
+ color: "#ccc",
133
+ fontSize: (0, _AppConstant.normalizeFont)(15),
134
+ fontFamily: _fontUtils.FONTS.SemiBold
135
+ },
136
+ priceText: {
137
+ color: "white",
138
+ fontSize: (0, _AppConstant.normalizeFont)(22),
139
+ fontFamily: _fontUtils.FONTS.SemiBold
140
+ },
141
+ couponContainer: {
142
+ flexDirection: "row",
143
+ marginTop: 8 * ratio,
144
+ alignItems: "center",
145
+ alignSelf: "flex-start"
146
+ },
147
+ couponText: {
148
+ color: "white",
149
+ fontSize: (0, _AppConstant.normalizeFont)(12),
150
+ fontFamily: _fontUtils.FONTS.SemiBold
151
+ },
152
+ couponImage: {
153
+ width: 18 * ratio,
154
+ height: 18 * ratio,
155
+ marginRight: 4 * ratio
156
+ },
157
+ couponDetailsContainer: {
158
+ width: "100%"
159
+ },
160
+ discountDetail2: {
161
+ fontSize: (0, _AppConstant.normalizeFont)(12),
162
+ color: "white",
163
+ marginLeft: 10 * ratio,
164
+ fontFamily: _fontUtils.FONTS.Medium
165
+ },
166
+ footerBottomText: {
167
+ color: "#cdbcea",
168
+ fontSize: (0, _AppConstant.normalizeFont)(12),
169
+ marginVertical: 6 * ratio,
170
+ fontFamily: _fontUtils.FONTS.Medium
171
+ },
172
+ viewDetails: {
173
+ fontSize: (0, _AppConstant.normalizeFont)(16),
174
+ color: "#F4CCE4",
175
+ fontFamily: _fontUtils.FONTS.SemiBold
176
+ }
177
+ });
@@ -0,0 +1,103 @@
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 _reactNativeSafeAreaContext = require("react-native-safe-area-context");
10
+ var _AppConstant = require("../../../assets/AppConstant");
11
+ var _reactRedux = require("react-redux");
12
+ var _Toast = _interopRequireDefault(require("../../Toast/Toast"));
13
+ var _PrimaryButton = _interopRequireDefault(require("../../Buttons/PrimaryButton/PrimaryButton"));
14
+ var _fontUtils = require("../../../utils/fontUtils");
15
+ var _lodash = require("lodash");
16
+ const MServiceFooter = ({
17
+ pageData,
18
+ cardData,
19
+ redirectToPage,
20
+ otpFlag,
21
+ redirectToResendOtp,
22
+ journeyType,
23
+ redirectToCancel,
24
+ redirectToOtp
25
+ }) => {
26
+ var _pageData$paymentFail;
27
+ const userAction = ""; // TODO this is coming from CartCreateSession and from a "userAction" cookie in web
28
+ const {
29
+ showToastMsg,
30
+ toastMessage
31
+ } = (0, _reactRedux.useSelector)(state => state.commonReducer);
32
+ const {
33
+ createSessionResponse
34
+ } = (0, _reactRedux.useSelector)(state => state.manageAppReducer);
35
+ const {
36
+ source = ""
37
+ } = createSessionResponse;
38
+ return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
39
+ edges: ["bottom"],
40
+ style: styles.safeAreaViewContainer
41
+ }, showToastMsg && /*#__PURE__*/React.createElement(_Toast.default, {
42
+ img: require("../../../assets/images/desktop-alert.png"),
43
+ title: pageData === null || pageData === void 0 || (_pageData$paymentFail = pageData.paymentFailed) === null || _pageData$paymentFail === void 0 ? void 0 : _pageData$paymentFail.title,
44
+ message: toastMessage ? toastMessage : "Something went wrong",
45
+ type: "PaymentFailed",
46
+ style: styles.toast
47
+ }), /*#__PURE__*/React.createElement(_reactNative.View, {
48
+ style: styles.container
49
+ }, !(0, _lodash.isEmpty)(journeyType) && journeyType === "CUSTOMER" ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_PrimaryButton.default, {
50
+ title: userAction === "Payment_Retry" ? pageData === null || pageData === void 0 ? void 0 : pageData.retryBtnLabel : pageData === null || pageData === void 0 ? void 0 : pageData.mServicePrimaryBtn,
51
+ onPress: redirectToPage
52
+ }), /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
53
+ onPress: redirectToCancel,
54
+ activeOpacity: 0.7,
55
+ style: styles.textButton
56
+ }, /*#__PURE__*/React.createElement(_reactNative.Text, {
57
+ style: styles.buttonText
58
+ }, pageData === null || pageData === void 0 ? void 0 : pageData.mServiceSecondaryBtn))) : ["MSERVICE", "MSERVICEFTV"].includes(source) && cardData !== null && cardData !== void 0 && cardData.otpEnabled ? /*#__PURE__*/React.createElement(_PrimaryButton.default, {
59
+ title: !otpFlag ? pageData === null || pageData === void 0 ? void 0 : pageData.otpBtn : pageData === null || pageData === void 0 ? void 0 : pageData.optEnter,
60
+ onPress: redirectToOtp
61
+ }) : /*#__PURE__*/React.createElement(_PrimaryButton.default, {
62
+ title: userAction === "Payment_Retry" ? pageData === null || pageData === void 0 ? void 0 : pageData.retryBtnLabel : pageData === null || pageData === void 0 ? void 0 : pageData.btnLabel,
63
+ onPress: redirectToPage
64
+ }), otpFlag && ["MSERVICE", "MSERVICEFTV"].includes(source) ? /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
65
+ onPress: redirectToResendOtp,
66
+ activeOpacity: 0.7,
67
+ style: styles.textButton
68
+ }, /*#__PURE__*/React.createElement(_reactNative.Text, {
69
+ style: styles.buttonText
70
+ }, pageData === null || pageData === void 0 ? void 0 : pageData.otpResend)) : null));
71
+ };
72
+ var _default = exports.default = MServiceFooter;
73
+ const ratio = _AppConstant.AppConstant.dimension.aspectRatio;
74
+ const styles = _reactNative.StyleSheet.create({
75
+ safeAreaViewContainer: {
76
+ width: "100%",
77
+ alignItems: "center"
78
+ },
79
+ container: {
80
+ paddingHorizontal: 16 * ratio,
81
+ paddingTop: 8 * ratio,
82
+ maxWidth: 400 * ratio,
83
+ paddingBottom: 6,
84
+ alignItems: "center"
85
+ },
86
+ textButton: {
87
+ height: 46 * ratio,
88
+ justifyContent: "center",
89
+ alignItems: "center"
90
+ },
91
+ buttonText: {
92
+ fontSize: (0, _AppConstant.normalizeFont)(16),
93
+ fontFamily: _fontUtils.FONTS.SemiBold,
94
+ color: "#F3CBE3"
95
+ },
96
+ toast: {
97
+ position: "absolute",
98
+ top: -150,
99
+ right: 0,
100
+ left: 0,
101
+ bottom: 0
102
+ }
103
+ });
@@ -0,0 +1,65 @@
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 _AppConstant = require("../../../assets/AppConstant");
11
+ var _reactNativeLinearGradient = _interopRequireDefault(require("react-native-linear-gradient"));
12
+ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
13
+ var _PrimaryButton = _interopRequireDefault(require("../../Buttons/PrimaryButton/PrimaryButton"));
14
+ var _commonUtils = require("../../../utils/commonUtils");
15
+ const OneButtonFooter = ({
16
+ buttonText,
17
+ disabled = false,
18
+ buttonComponent = null,
19
+ onClick = {},
20
+ style = {}
21
+ }) => {
22
+ return /*#__PURE__*/_react.default.createElement(_reactNativeLinearGradient.default, {
23
+ colors: ["#220046", "#020005"],
24
+ start: {
25
+ x: 0,
26
+ y: 0
27
+ },
28
+ end: {
29
+ x: 1,
30
+ y: 0
31
+ },
32
+ style: [styles.container]
33
+ }, /*#__PURE__*/_react.default.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
34
+ edges: ["bottom"],
35
+ style: [styles.mainContainer, style]
36
+ }, typeof buttonComponent == "function" ? buttonComponent() : /*#__PURE__*/_react.default.createElement(_PrimaryButton.default, {
37
+ onPress: onClick,
38
+ title: buttonText,
39
+ disabled: disabled,
40
+ style: styles.buttonStyle
41
+ })));
42
+ };
43
+ var _default = exports.default = OneButtonFooter;
44
+ const ratio = _AppConstant.AppConstant.dimension.aspectRatio;
45
+ const styles = _reactNative.StyleSheet.create({
46
+ container: {
47
+ width: "100%",
48
+ backgroundColor: "#220046",
49
+ justifyContent: "center",
50
+ alignItems: "center",
51
+ borderTopWidth: 1,
52
+ borderTopColor: "#564372"
53
+ },
54
+ mainContainer: {
55
+ paddingHorizontal: 16 * ratio,
56
+ paddingTop: 8 * ratio,
57
+ maxWidth: 400 * ratio,
58
+ paddingBottom: 5,
59
+ justifyContent: "center",
60
+ alignItems: "center"
61
+ },
62
+ buttonStyle: {
63
+ width: ratio * ((0, _commonUtils.isTablet)() ? 400 : 310)
64
+ }
65
+ });
@@ -0,0 +1,180 @@
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 _reactNativeSafeAreaContext = require("react-native-safe-area-context");
10
+ var _PrimaryButton = _interopRequireDefault(require("../../Buttons/PrimaryButton/PrimaryButton"));
11
+ var _AppConstant = require("../../../assets/AppConstant");
12
+ var _string = require("../../../utils/string");
13
+ var _reactNativeLinearGradient = require("react-native-linear-gradient");
14
+ var _fontUtils = require("../../../utils/fontUtils");
15
+ var _lodash = require("lodash");
16
+ var _Home = require("../../../Constants/Home");
17
+ var _serviceCommonHandler = require("../../../services/serviceCommonHandler");
18
+ var _react = require("react");
19
+ var _commonUtils = require("../../../utils/commonUtils");
20
+ const SummaryFooter = ({
21
+ pageData,
22
+ packData,
23
+ buttonText,
24
+ onButtonClick,
25
+ isButtonEnabled = true,
26
+ showCoupon = true,
27
+ onViewMoreClick = null,
28
+ style
29
+ }) => {
30
+ const finalPrice = packData === null || packData === void 0 ? void 0 : packData.payableAmount;
31
+ const originalPrice = packData === null || packData === void 0 ? void 0 : packData.planAmount;
32
+ const tenure = _Home.tenureConstants[(packData === null || packData === void 0 ? void 0 : packData.shortTenure) || (packData === null || packData === void 0 ? void 0 : packData.tenure)];
33
+ const couponDetails = packData === null || packData === void 0 ? void 0 : packData.bestOffer;
34
+ const couponOfferName = couponDetails === null || couponDetails === void 0 ? void 0 : couponDetails.offerName;
35
+ const couponName = (0, _react.useMemo)(() => {
36
+ return (0, _string.replacePlaceholderInString)(pageData === null || pageData === void 0 ? void 0 : pageData.discountDetail, ["offerName", "percentage"], [couponOfferName, couponDetails === null || couponDetails === void 0 ? void 0 : couponDetails.discountValue]);
37
+ }, [pageData, couponOfferName]);
38
+ const couponTenure = (0, _react.useMemo)(() => {
39
+ if ((0, _lodash.isEmpty)(packData === null || packData === void 0 ? void 0 : packData.shortTenure)) return "";
40
+ return (0, _string.replacePlaceholderInString)(pageData === null || pageData === void 0 ? void 0 : pageData.discountDetail2, "tenure", _Home.bingeOfferTenure[packData === null || packData === void 0 ? void 0 : packData.shortTenure]);
41
+ }, [pageData, packData === null || packData === void 0 ? void 0 : packData.couponTenure]);
42
+ return /*#__PURE__*/React.createElement(_reactNativeLinearGradient.LinearGradient, {
43
+ colors: ["#220046", "#020005"],
44
+ start: {
45
+ x: 0,
46
+ y: 0
47
+ },
48
+ end: {
49
+ x: 1,
50
+ y: 0
51
+ },
52
+ style: [styles.container, style]
53
+ }, /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
54
+ edges: ["bottom"],
55
+ style: styles.mainContainer
56
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
57
+ style: styles.footerDetailsAndBtnContainer
58
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
59
+ style: styles.textContainer
60
+ }, /*#__PURE__*/React.createElement(_reactNative.Text, null, couponOfferName && originalPrice && finalPrice && /*#__PURE__*/React.createElement(_reactNative.Text, null, /*#__PURE__*/React.createElement(_reactNative.Text, {
61
+ style: styles.originalPrice
62
+ }, "\u20B9", originalPrice), /*#__PURE__*/React.createElement(_reactNative.Text, {
63
+ style: styles.priceText
64
+ }, " \u20B9", finalPrice)), !couponOfferName && /*#__PURE__*/React.createElement(_reactNative.Text, {
65
+ style: styles.priceText
66
+ }, " \u20B9", finalPrice || originalPrice), !(0, _lodash.isEmpty)(tenure) && /*#__PURE__*/React.createElement(_reactNative.Text, {
67
+ style: styles.tenure
68
+ }, " for ", tenure))), /*#__PURE__*/React.createElement(_PrimaryButton.default, {
69
+ title: buttonText,
70
+ onPress: onButtonClick,
71
+ style: {
72
+ width: 120 * ratio
73
+ },
74
+ disabled: !isButtonEnabled
75
+ })), couponOfferName && showCoupon && /*#__PURE__*/React.createElement(_reactNative.View, {
76
+ style: styles.couponDetailsContainer
77
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
78
+ style: styles.couponContainer
79
+ }, /*#__PURE__*/React.createElement(_reactNative.Image, {
80
+ source: {
81
+ uri: _serviceCommonHandler.serviceConsts.baseUrls.imageBaseUrl + "disImg.png"
82
+ },
83
+ style: styles.couponImage
84
+ }), /*#__PURE__*/React.createElement(_reactNative.Text, {
85
+ style: styles.couponText
86
+ }, couponName), couponTenure && /*#__PURE__*/React.createElement(_reactNative.Text, {
87
+ style: styles.discountDetail2
88
+ }, couponTenure))), (packData === null || packData === void 0 ? void 0 : packData.shortTenure) !== "2 Months" && /*#__PURE__*/React.createElement(_reactNative.Text, {
89
+ style: styles.footerBottomText
90
+ }, (0, _commonUtils.replaceStringWithParams)(pageData === null || pageData === void 0 ? void 0 : pageData.footerBottom, {
91
+ "!amount!": finalPrice || originalPrice,
92
+ "!tenure!": tenure
93
+ })), (packData === null || packData === void 0 ? void 0 : packData.shortTenure) === "2 Months" && /*#__PURE__*/React.createElement(_reactNative.Text, {
94
+ style: styles.footerBottomText
95
+ }, `You will be charged ₹149/month for renewal starting ${packData === null || packData === void 0 ? void 0 : packData.planDate}.`)));
96
+ };
97
+ var _default = exports.default = SummaryFooter;
98
+ const ratio = _AppConstant.AppConstant.dimension.aspectRatio;
99
+ const styles = _reactNative.StyleSheet.create({
100
+ container: {
101
+ width: "100%",
102
+ backgroundColor: "#220046",
103
+ justifyContent: "center",
104
+ alignItems: "center",
105
+ borderTopWidth: 1,
106
+ borderTopColor: "#564372"
107
+ },
108
+ mainContainer: {
109
+ paddingHorizontal: 16 * ratio,
110
+ paddingTop: 8 * ratio,
111
+ maxWidth: 400 * ratio,
112
+ alignItems: "flex-start",
113
+ paddingBottom: 5
114
+ },
115
+ footerDetailsAndBtnContainer: {
116
+ flexDirection: "row",
117
+ alignItems: "center"
118
+ },
119
+ textContainer: {
120
+ flex: 1
121
+ },
122
+ selectionCount: {
123
+ color: "white",
124
+ fontSize: (0, _AppConstant.normalizeFont)(12),
125
+ fontFamily: _fontUtils.FONTS.Medium
126
+ },
127
+ tenure: {
128
+ fontSize: (0, _AppConstant.normalizeFont)(14),
129
+ color: "white",
130
+ fontFamily: _fontUtils.FONTS.SemiBold
131
+ },
132
+ originalPrice: {
133
+ textDecorationLine: "line-through",
134
+ color: "#ccc",
135
+ fontSize: (0, _AppConstant.normalizeFont)(15),
136
+ fontFamily: _fontUtils.FONTS.SemiBold
137
+ },
138
+ priceText: {
139
+ color: "white",
140
+ fontSize: (0, _AppConstant.normalizeFont)(22),
141
+ fontFamily: _fontUtils.FONTS.SemiBold
142
+ },
143
+ couponContainer: {
144
+ flexDirection: "row",
145
+ marginTop: 8 * ratio,
146
+ alignItems: "center",
147
+ alignSelf: "flex-start"
148
+ },
149
+ couponText: {
150
+ color: "white",
151
+ fontSize: (0, _AppConstant.normalizeFont)(12),
152
+ fontFamily: _fontUtils.FONTS.SemiBold
153
+ },
154
+ couponImage: {
155
+ width: 18 * ratio,
156
+ height: 18 * ratio,
157
+ marginRight: 4 * ratio
158
+ },
159
+ couponDetailsContainer: {
160
+ width: "100%",
161
+ marginTop: -5 * ratio
162
+ },
163
+ discountDetail2: {
164
+ fontSize: (0, _AppConstant.normalizeFont)(12),
165
+ color: "white",
166
+ marginLeft: 10 * ratio,
167
+ fontFamily: _fontUtils.FONTS.Medium
168
+ },
169
+ footerBottomText: {
170
+ color: "#cdbcea",
171
+ fontSize: (0, _AppConstant.normalizeFont)(12),
172
+ marginVertical: 6 * ratio,
173
+ fontFamily: _fontUtils.FONTS.Medium
174
+ },
175
+ viewDetails: {
176
+ fontSize: (0, _AppConstant.normalizeFont)(16),
177
+ color: "#F4CCE4",
178
+ fontFamily: _fontUtils.FONTS.SemiBold
179
+ }
180
+ });