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,268 @@
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 _PlanCardStyles = _interopRequireDefault(require("./PlanCardStyles"));
11
+ var _PrimaryButton = _interopRequireDefault(require("../Buttons/PrimaryButton/PrimaryButton"));
12
+ var _RadioButton = _interopRequireDefault(require("../Buttons/RadioButton/RadioButton"));
13
+ var _serviceCommonHandler = require("../../services/serviceCommonHandler");
14
+ var _reactRedux = require("react-redux");
15
+ var _string = require("../../utils/string");
16
+ var _lodash = require("lodash");
17
+ var _RenderAppIcons = require("./RenderAppIcons");
18
+ var _PrimeAddOn = _interopRequireDefault(require("../PrimeAddOn/PrimeAddOn"));
19
+ var _commonUtils = require("../../utils/commonUtils");
20
+ var _Home = require("../../Constants/Home");
21
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
22
+ var _GradientText = _interopRequireDefault(require("../GradientText/GradientText"));
23
+ 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); }
24
+ const PlanCard = ({
25
+ drupal,
26
+ plan,
27
+ onButtonClick,
28
+ selectTenure,
29
+ selectedPack,
30
+ journey,
31
+ journeySourceRefld
32
+ }) => {
33
+ var _plan$appList;
34
+ const {
35
+ addOnPlans
36
+ } = (0, _reactRedux.useSelector)(state => state.manageAppReducer);
37
+ const tenuresList = plan === null || plan === void 0 ? void 0 : plan.tenureList;
38
+ const appList = (plan === null || plan === void 0 || (_plan$appList = plan.appList) === null || _plan$appList === void 0 ? void 0 : _plan$appList.BUCKET1) ?? [];
39
+ const packInfo = tenuresList === null || tenuresList === void 0 ? void 0 : tenuresList.find(it => (it === null || it === void 0 ? void 0 : it.shortTenure) === "2 Months");
40
+ if (plan == null) {
41
+ return null;
42
+ }
43
+ if (tenuresList == null || !Array.isArray(tenuresList) || typeof tenuresList != "object") {
44
+ return null;
45
+ }
46
+ if (appList == null || !Array.isArray(appList) || typeof appList !== "object") {
47
+ return null;
48
+ }
49
+ const isActive = plan === null || plan === void 0 ? void 0 : plan.tenureList.some(item => (item === null || item === void 0 ? void 0 : item.packId) == (selectedPack === null || selectedPack === void 0 ? void 0 : selectedPack.selectedPackID));
50
+ const isButtonActive = (plan === null || plan === void 0 ? void 0 : plan.isCurrentPlan) || (plan === null || plan === void 0 ? void 0 : plan.isFreeTrialPack) || isActive || (plan === null || plan === void 0 ? void 0 : plan.tenureType) === "2 Months";
51
+ const [selectedTenure, setSelectedTenure] = (0, _react.useState)(tenuresList === null || tenuresList === void 0 ? void 0 : tenuresList[0]);
52
+ const complimentaryCount = (0, _react.useMemo)(() => {
53
+ return appList === null || appList === void 0 ? void 0 : appList.filter(app => app === null || app === void 0 ? void 0 : app.isComplimentary).length;
54
+ }, [appList]);
55
+ const isSportsPlus = ["BINGEMON86", "BINGEMON71"].find(id => (plan === null || plan === void 0 ? void 0 : plan.packId) == id);
56
+ const getMainHeading = () => {
57
+ let heading = "";
58
+ if ((plan === null || plan === void 0 ? void 0 : plan.productType) == "Flexi") {
59
+ var _plan$totalApps;
60
+ heading = (0, _string.replacePlaceholderInString)(drupal === null || drupal === void 0 ? void 0 : drupal.flexiHeading, "appCount", ((plan === null || plan === void 0 || (_plan$totalApps = plan.totalApps) === null || _plan$totalApps === void 0 || (_plan$totalApps = _plan$totalApps.BUCKET1) === null || _plan$totalApps === void 0 ? void 0 : _plan$totalApps.max) ?? 0) + complimentaryCount);
61
+ } else {
62
+ var _plan$appList2;
63
+ heading = (0, _string.replacePlaceholderInString)(drupal === null || drupal === void 0 ? void 0 : drupal.fixedHeading, "appCount", ((plan === null || plan === void 0 || (_plan$appList2 = plan.appList) === null || _plan$appList2 === void 0 || (_plan$appList2 = _plan$appList2.BUCKET1) === null || _plan$appList2 === void 0 ? void 0 : _plan$appList2.length) ?? 0) + complimentaryCount);
64
+ }
65
+ return heading;
66
+ };
67
+ const getHeading = () => {
68
+ if ((plan === null || plan === void 0 ? void 0 : plan.productType) == "Flexi") {
69
+ var _plan$totalApps2;
70
+ return (0, _string.replacePlaceholderInString)(drupal === null || drupal === void 0 ? void 0 : drupal.chooseAppCount, "appCount", (plan === null || plan === void 0 || (_plan$totalApps2 = plan.totalApps) === null || _plan$totalApps2 === void 0 || (_plan$totalApps2 = _plan$totalApps2.BUCKET1) === null || _plan$totalApps2 === void 0 ? void 0 : _plan$totalApps2.max) ?? "");
71
+ } else {
72
+ if (isSportsPlus) {
73
+ var _plan$appList3;
74
+ return (0, _string.replacePlaceholderInString)(drupal === null || drupal === void 0 ? void 0 : drupal.sportsHeading, "appCount", plan === null || plan === void 0 || (_plan$appList3 = plan.appList) === null || _plan$appList3 === void 0 || (_plan$appList3 = _plan$appList3.BUCKET1) === null || _plan$appList3 === void 0 ? void 0 : _plan$appList3.length);
75
+ } else {
76
+ var _plan$appList4;
77
+ return (0, _string.replacePlaceholderInString)("All !appCount! Apps Included", "appCount", plan === null || plan === void 0 || (_plan$appList4 = plan.appList) === null || _plan$appList4 === void 0 || (_plan$appList4 = _plan$appList4.BUCKET1) === null || _plan$appList4 === void 0 ? void 0 : _plan$appList4.length);
78
+ }
79
+ }
80
+ };
81
+ const getComplimentaryAppsCountText = () => {
82
+ if ((plan === null || plan === void 0 ? void 0 : plan.productType) == "Flexi") {
83
+ return complimentaryCount > 0 && (0, _string.replacePlaceholderInString)(drupal === null || drupal === void 0 ? void 0 : drupal.complimentryAppCount, "appCount", complimentaryCount);
84
+ } else {
85
+ return "";
86
+ }
87
+ };
88
+ const getSubHeading = (0, _react.useCallback)(() => {
89
+ if (plan !== null && plan !== void 0 && plan.isFreeTrialPack) {
90
+ return `${plan === null || plan === void 0 ? void 0 : plan.totalValidity} ${_Home.tenureConstants[plan === null || plan === void 0 ? void 0 : plan.tenureType]} free trial, offer valid for ${plan === null || plan === void 0 ? void 0 : plan.remainingDays} days`;
91
+ }
92
+ if (["BINGEMON112"].includes(plan === null || plan === void 0 ? void 0 : plan.packId)) {
93
+ var _plan$appList5;
94
+ return (0, _string.replacePlaceholderInString)(drupal === null || drupal === void 0 ? void 0 : drupal.englishApps, "appCount", (plan === null || plan === void 0 || (_plan$appList5 = plan.appList) === null || _plan$appList5 === void 0 || (_plan$appList5 = _plan$appList5.BUCKET1) === null || _plan$appList5 === void 0 ? void 0 : _plan$appList5.length) || 0);
95
+ }
96
+ return `${getHeading()}${getComplimentaryAppsCountText()}`;
97
+ }, [plan, drupal]);
98
+ const getWatchOnDevices = () => (0, _string.replacePlaceholderInString)((0, _commonUtils.isTablet)() ? drupal === null || drupal === void 0 ? void 0 : drupal.watchLDevice : drupal === null || drupal === void 0 ? void 0 : drupal.watchDevice, "deviceCount", plan === null || plan === void 0 ? void 0 : plan.totalDevices);
99
+ const getWatchDevices = () => {
100
+ var _plan$deviceListInfo;
101
+ return (plan === null || plan === void 0 || (_plan$deviceListInfo = plan.deviceListInfo) === null || _plan$deviceListInfo === void 0 ? void 0 : _plan$deviceListInfo.title) ?? "";
102
+ };
103
+ const getButtonTitle = () => {
104
+ if (plan !== null && plan !== void 0 && plan.isFreeTrialPack) {
105
+ var _drupal$freeTrail;
106
+ return drupal === null || drupal === void 0 || (_drupal$freeTrail = drupal.freeTrail) === null || _drupal$freeTrail === void 0 ? void 0 : _drupal$freeTrail.btn;
107
+ } else if ((plan === null || plan === void 0 ? void 0 : plan.productType) == "Flexi" && !(plan !== null && plan !== void 0 && plan.isCurrentPlan)) {
108
+ var _drupal$myop;
109
+ return drupal === null || drupal === void 0 || (_drupal$myop = drupal.myop) === null || _drupal$myop === void 0 ? void 0 : _drupal$myop.primaryBtn;
110
+ } else {
111
+ return "Choose Plan";
112
+ }
113
+ };
114
+ const couponCodeExist = () => {
115
+ const couponOfferExist = tenuresList.filter(item => item.couponOfferId !== null);
116
+ if (!(0, _lodash.isEmpty)(couponOfferExist) && Array.isArray(couponOfferExist)) {
117
+ return true;
118
+ }
119
+ return false;
120
+ };
121
+ const tagArray = (0, _react.useMemo)(() => {
122
+ const tags = [];
123
+ if (couponCodeExist() && drupal !== null && drupal !== void 0 && drupal.superSaverTag) tags.push(drupal === null || drupal === void 0 ? void 0 : drupal.superSaverTag);
124
+ if (journey !== "COUPONS" && !couponCodeExist() && (plan === null || plan === void 0 ? void 0 : plan.packType.toUpperCase()) == "BS" && drupal !== null && drupal !== void 0 && drupal.BingeBestsellers) tags.push(drupal === null || drupal === void 0 ? void 0 : drupal.BingeBestsellers);
125
+ if (isSportsPlus && drupal !== null && drupal !== void 0 && drupal.SportsTagName) tags.push(drupal === null || drupal === void 0 ? void 0 : drupal.SportsTagName);
126
+ if (plan !== null && plan !== void 0 && plan.isCurrentPlan && drupal !== null && drupal !== void 0 && drupal.currentPlanTag) tags.push(drupal === null || drupal === void 0 ? void 0 : drupal.currentPlanTag);
127
+ if (plan !== null && plan !== void 0 && plan.isRecommended && drupal !== null && drupal !== void 0 && drupal.recommendedTag) tags.push(drupal === null || drupal === void 0 ? void 0 : drupal.recommendedTag);
128
+ if (["BINGEMON112"].includes(plan === null || plan === void 0 ? void 0 : plan.packId)) tags.push(drupal === null || drupal === void 0 ? void 0 : drupal.englishTag);
129
+ return tags;
130
+ }, [isSportsPlus, plan, drupal]);
131
+ const Tag = ({
132
+ tagName
133
+ }) => {
134
+ if (tagName == null) return null;
135
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
136
+ style: _PlanCardStyles.default.tagContainer
137
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
138
+ style: _PlanCardStyles.default.tagText
139
+ }, tagName));
140
+ };
141
+ const handleTenureSelection = tenure => {
142
+ // setActive(plan?.packId);
143
+ setSelectedTenure(tenure);
144
+ selectTenure(tenure);
145
+ };
146
+ const renderTenureOptions = () => {
147
+ return tenuresList === null || tenuresList === void 0 ? void 0 : tenuresList.map((tenure, index) => {
148
+ const isSelected = isActive ? (selectedTenure === null || selectedTenure === void 0 ? void 0 : selectedTenure.packId) === (tenure === null || tenure === void 0 ? void 0 : tenure.packId) : false;
149
+ const isBestOffer = tenure === null || tenure === void 0 ? void 0 : tenure.bestTenure;
150
+ const hasDiscount = (tenure === null || tenure === void 0 ? void 0 : tenure.offer) > 0 ?? false;
151
+ const isCouponApplied = !(0, _lodash.isEmpty)(tenure === null || tenure === void 0 ? void 0 : tenure.couponOfferId) && journey != "COUPONS" && !(plan !== null && plan !== void 0 && plan.isFreeTrialPack);
152
+ const couponOfferName = tenure === null || tenure === void 0 ? void 0 : tenure.couponOfferName;
153
+ const tenureText = (0, _string.mapTenureToDuration)(tenure === null || tenure === void 0 ? void 0 : tenure.tenure);
154
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
155
+ key: tenure.packId
156
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
157
+ style: _PlanCardStyles.default.tenureOption,
158
+ onPress: () => handleTenureSelection(tenure),
159
+ activeOpacity: 1
160
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
161
+ style: _PlanCardStyles.default.tenureContent
162
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
163
+ style: _PlanCardStyles.default.tenureText
164
+ }, tenureText), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
165
+ style: _PlanCardStyles.default.priceContainer
166
+ }, isBestOffer && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
167
+ style: _PlanCardStyles.default.bestTenureMarkContainer
168
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
169
+ style: _PlanCardStyles.default.bestTenureThumbsUp,
170
+ source: {
171
+ uri: _serviceCommonHandler.serviceConsts.baseUrls.imageBaseUrl + "thumpsUp.png"
172
+ }
173
+ })), hasDiscount && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
174
+ style: _PlanCardStyles.default.saveBadge
175
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
176
+ style: _PlanCardStyles.default.saveBadgeText
177
+ }, (0, _string.replacePlaceholderInString)(drupal === null || drupal === void 0 ? void 0 : drupal.appsDiscount, "discount", tenure === null || tenure === void 0 ? void 0 : tenure.offer))), !isCouponApplied ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
178
+ style: _PlanCardStyles.default.priceText
179
+ }, `₹${tenure.totalAmount}`) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
180
+ style: _PlanCardStyles.default.dicountedPriceWrapper
181
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
182
+ style: [_PlanCardStyles.default.priceText, _PlanCardStyles.default.discountedPriceText]
183
+ }, `₹${tenure.totalAmount}`), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
184
+ style: _PlanCardStyles.default.priceText
185
+ }, `₹${tenure.discountedPackPrice}`)))), couponOfferName != null && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
186
+ style: _PlanCardStyles.default.bestOfferContainer
187
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
188
+ style: _PlanCardStyles.default.discountText
189
+ }, (0, _string.replacePlaceholderInString)(drupal === null || drupal === void 0 ? void 0 : drupal.tenureOffer, ["offerName", "percentage"], [couponOfferName, tenure === null || tenure === void 0 ? void 0 : tenure.amountDiscount]))), /*#__PURE__*/_react.default.createElement(_RadioButton.default, {
190
+ selected: isSelected,
191
+ onPress: () => handleTenureSelection(tenure)
192
+ })), !((tenuresList === null || tenuresList === void 0 ? void 0 : tenuresList.length) - 1 === index) && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
193
+ style: _PlanCardStyles.default.divider
194
+ }));
195
+ });
196
+ };
197
+ return /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
198
+ layout: _reactNativeReanimated.LinearTransition.easing(_reactNativeReanimated.Easing.linear).duration(120),
199
+ style: _PlanCardStyles.default.container
200
+ }, !["PACKCONTENT"].includes(journey) && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
201
+ style: {
202
+ flexDirection: "row",
203
+ gap: 2
204
+ }
205
+ }, tagArray.map((tag, idx) => /*#__PURE__*/_react.default.createElement(Tag, {
206
+ key: idx,
207
+ tagName: tag
208
+ }))), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
209
+ layout: _reactNativeReanimated.LinearTransition.easing(_reactNativeReanimated.Easing.linear).duration(120),
210
+ style: _PlanCardStyles.default.card
211
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
212
+ style: _PlanCardStyles.default.innerContainer
213
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
214
+ style: _PlanCardStyles.default.heading
215
+ }, getMainHeading(), (plan === null || plan === void 0 ? void 0 : plan.tenureType) === "2 Months" && !(0, _lodash.isEmpty)(packInfo === null || packInfo === void 0 ? void 0 : packInfo.couponOfferId) && /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, " @ ", /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
216
+ style: _PlanCardStyles.default.strikeThrough
217
+ }, `₹${packInfo === null || packInfo === void 0 ? void 0 : packInfo.totalMrp}`))), (plan === null || plan === void 0 ? void 0 : plan.tenureType) === "2 Months" && !(0, _lodash.isEmpty)(packInfo === null || packInfo === void 0 ? void 0 : packInfo.couponOfferId) && /*#__PURE__*/_react.default.createElement(_GradientText.default, {
218
+ colors: ["#ffa800", "#ffe978", "#ffa800"],
219
+ borderWidth: 1,
220
+ borderColor: "#220046",
221
+ style: _PlanCardStyles.default.offerDetails
222
+ }, `₹${packInfo === null || packInfo === void 0 ? void 0 : packInfo.discountedPackPrice} for ${_Home.tenureConstants[(packInfo === null || packInfo === void 0 ? void 0 : packInfo.shortTenure) ?? "2 Months"]}`), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
223
+ style: _PlanCardStyles.default.benefitsContainer
224
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
225
+ style: _PlanCardStyles.default.benefitsText
226
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
227
+ style: _PlanCardStyles.default.chooseText
228
+ }, getSubHeading())), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
229
+ style: [_PlanCardStyles.default.watchDevicesContainer, (0, _commonUtils.isTablet)() && {
230
+ flexDirection: "row"
231
+ }]
232
+ }, plan !== null && plan !== void 0 && plan.totalDevices ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
233
+ style: _PlanCardStyles.default.deviceText
234
+ }, getWatchOnDevices()) : null, (0, _commonUtils.isTablet)() && (plan === null || plan === void 0 ? void 0 : plan.totalDevices) && /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
235
+ style: _PlanCardStyles.default.textDivider
236
+ }, " | "), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
237
+ style: _PlanCardStyles.default.deviceText
238
+ }, getWatchDevices()))), /*#__PURE__*/_react.default.createElement(_RenderAppIcons.RenderAppIcons, {
239
+ appList: appList,
240
+ drupal: drupal,
241
+ productType: plan === null || plan === void 0 ? void 0 : plan.productType,
242
+ isFreeTrialPack: plan === null || plan === void 0 ? void 0 : plan.isFreeTrialPack,
243
+ maxSlots: (0, _commonUtils.isTablet)() ? 12 : 10
244
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
245
+ layout: _reactNativeReanimated.LinearTransition.easing(_reactNativeReanimated.Easing.linear).duration(120),
246
+ style: _PlanCardStyles.default.tenureNdButtonContainer
247
+ }, !(plan !== null && plan !== void 0 && plan.isFreeTrialPack) && (plan === null || plan === void 0 ? void 0 : plan.tenureType) !== "2 Months" && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
248
+ style: _PlanCardStyles.default.tenuresContainer
249
+ }, renderTenureOptions()), !(plan !== null && plan !== void 0 && plan.isCurrentPlan) && addOnPlans !== null && (plan === null || plan === void 0 ? void 0 : plan.eligibleAddOnPlans) && (plan === null || plan === void 0 ? void 0 : plan.eligibleAddOnPlans.map((it, idx) => {
250
+ var _drupal$packOnList;
251
+ const key = `${(it === null || it === void 0 ? void 0 : it.packId) ?? ""}_${idx}`;
252
+ return /*#__PURE__*/_react.default.createElement(_PrimeAddOn.default, {
253
+ key: key,
254
+ data: it,
255
+ pageData: drupal === null || drupal === void 0 || (_drupal$packOnList = drupal.packOnList) === null || _drupal$packOnList === void 0 ? void 0 : _drupal$packOnList.PRIME,
256
+ journey: journey,
257
+ journeySourceRefld: journeySourceRefld
258
+ });
259
+ })), /*#__PURE__*/_react.default.createElement(_PrimaryButton.default, {
260
+ style: {
261
+ width: "100%"
262
+ },
263
+ title: getButtonTitle(),
264
+ disabled: !isButtonActive,
265
+ onPress: () => onButtonClick(plan, selectedTenure)
266
+ })))));
267
+ };
268
+ var _default = exports.default = /*#__PURE__*/_react.default.memo(PlanCard);
@@ -0,0 +1,371 @@
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
+ const cardWidth = ratio * ((0, _commonUtils.isTablet)() ? 450 : 326);
13
+ var _default = exports.default = PlanCardStyles = _reactNative.StyleSheet.create({
14
+ container: {
15
+ marginHorizontal: 17 * ratio,
16
+ width: cardWidth,
17
+ marginTop: 14 * ratio,
18
+ alignSelf: "center",
19
+ borderRadius: 10 * ratio
20
+ },
21
+ backgroundGradient: {
22
+ width: cardWidth,
23
+ borderRadius: 10 * ratio
24
+ },
25
+ tagContainer: {
26
+ backgroundColor: "#6B00DD",
27
+ paddingHorizontal: 5 * ratio,
28
+ paddingVertical: 4.5 * ratio,
29
+ borderTopLeftRadius: 6 * ratio,
30
+ borderTopRightRadius: 6 * ratio,
31
+ alignSelf: "flex-start",
32
+ marginLeft: 10 * ratio
33
+ },
34
+ tagText: {
35
+ color: "#FFFFFF",
36
+ fontSize: (0, _AppConstant.normalizeFont)(14),
37
+ fontFamily: _fontUtils.FONTS.SemiBold
38
+ },
39
+ card: {
40
+ backgroundColor: "#efe8fa",
41
+ borderRadius: 10 * ratio,
42
+ paddingVertical: 16 * ratio,
43
+ paddingHorizontal: 16 * ratio,
44
+ justifyContent: "center",
45
+ alignItems: "center"
46
+ },
47
+ regionalnSportsCard: {
48
+ borderRadius: 10 * ratio,
49
+ paddingVertical: 16 * ratio,
50
+ paddingHorizontal: 16 * ratio,
51
+ justifyContent: "center",
52
+ alignItems: "center"
53
+ },
54
+ heading: {
55
+ fontSize: (0, _AppConstant.normalizeFont)(24),
56
+ color: "#130036",
57
+ textAlign: "center",
58
+ fontFamily: _fontUtils.FONTS.SemiBold
59
+ },
60
+ gradientText: {
61
+ fontFamily: _fontUtils.FONTS.Bold,
62
+ fontSize: (0, _AppConstant.normalizeFont)(26),
63
+ letterSpacing: 3
64
+ },
65
+ benefitsContainer: {
66
+ alignItems: "center"
67
+ },
68
+ benefitsText: {
69
+ fontSize: (0, _AppConstant.normalizeFont)(13),
70
+ flexDirection: "row",
71
+ marginTop: 12 * ratio,
72
+ justifyContent: "center",
73
+ alignItems: "center",
74
+ fontFamily: _fontUtils.FONTS.SemiBold,
75
+ color: "#130036"
76
+ },
77
+ chooseText: {
78
+ fontSize: (0, _AppConstant.normalizeFont)(14),
79
+ color: "#130036",
80
+ textAlign: "center",
81
+ fontFamily: _fontUtils.FONTS.SemiBold
82
+ },
83
+ watchDevicesContainer: {
84
+ marginTop: 8 * ratio,
85
+ marginBottom: 12 * ratio,
86
+ justifyContent: "center",
87
+ alignItems: "center"
88
+ },
89
+ deviceText: {
90
+ fontSize: (0, _AppConstant.normalizeFont)(12),
91
+ color: "#130036",
92
+ textAlign: "center",
93
+ fontFamily: _fontUtils.FONTS.Medium
94
+ },
95
+ appIconsContainer: {
96
+ width: "100%",
97
+ justifyContent: "center",
98
+ alignItems: "center",
99
+ marginBottom: 5 * ratio
100
+ },
101
+ appIconsRow: {
102
+ width: ratio * ((0, _commonUtils.isTablet)() ? 400 : 340),
103
+ justifyContent: "flex-start",
104
+ alignItems: "center",
105
+ flexDirection: "row",
106
+ flexWrap: "wrap",
107
+ gap: 15 * ratio,
108
+ paddingHorizontal: 22.5 * ratio
109
+ },
110
+ appIconWrapper: {
111
+ width: 46 * ratio,
112
+ height: 46 * ratio,
113
+ overflow: "hidden",
114
+ justifyContent: "center",
115
+ alignItems: "center",
116
+ borderRadius: 4 * ratio
117
+ },
118
+ appIcon: {
119
+ width: "100%",
120
+ height: "100%",
121
+ resizeMode: "contain"
122
+ },
123
+ moreAppsWrapper: {
124
+ justifyContent: "center",
125
+ alignItems: "center"
126
+ },
127
+ moreAppsText: {
128
+ fontSize: (0, _AppConstant.normalizeFont)(13.5),
129
+ color: "#130036",
130
+ alignSelf: "center",
131
+ fontFamily: _fontUtils.FONTS.SemiBold
132
+ },
133
+ moreAppsLabel: {
134
+ fontSize: (0, _AppConstant.normalizeFont)(14),
135
+ color: "#130036",
136
+ fontFamily: _fontUtils.FONTS.SemiBold
137
+ },
138
+ tenuresContainer: {
139
+ marginVertical: 10 * ratio,
140
+ paddingHorizontal: (0, _commonUtils.isTablet)() && 35 * ratio
141
+ },
142
+ tenureOption: {
143
+ width: "100%",
144
+ paddingVertical: 10 * ratio,
145
+ flexDirection: "row",
146
+ alignItems: "center",
147
+ justifyContent: "space-between",
148
+ borderRadius: 7 * ratio,
149
+ marginTop: 5 * ratio
150
+ },
151
+ tenureContent: {
152
+ flex: 1,
153
+ flexDirection: "row",
154
+ justifyContent: "space-between",
155
+ alignItems: "center",
156
+ paddingEnd: 6 * ratio
157
+ },
158
+ tenureText: {
159
+ fontSize: (0, _AppConstant.normalizeFont)(16),
160
+ color: "#1F2937",
161
+ lineHeight: 16 * ratio,
162
+ fontFamily: _fontUtils.FONTS.Medium
163
+ },
164
+ priceContainer: {
165
+ flexDirection: "row",
166
+ alignItems: "center"
167
+ },
168
+ saveBadge: {
169
+ backgroundColor: "#6B00DD",
170
+ borderRadius: 6 * ratio,
171
+ marginRight: 6 * ratio,
172
+ justifyContent: "center",
173
+ alignItems: "center",
174
+ paddingHorizontal: 6 * ratio,
175
+ paddingVertical: 3 * ratio
176
+ },
177
+ saveBadgeText: {
178
+ color: "#FFFFFF",
179
+ fontSize: (0, _AppConstant.normalizeFont)(11),
180
+ fontFamily: _fontUtils.FONTS.SemiBold
181
+ },
182
+ priceText: {
183
+ fontSize: (0, _AppConstant.normalizeFont)(18),
184
+ color: "#1F2937",
185
+ lineHeight: 18 * ratio,
186
+ fontFamily: _fontUtils.FONTS.SemiBold
187
+ },
188
+ divider: {
189
+ width: "100%",
190
+ height: 1 * ratio,
191
+ backgroundColor: "#464748ff",
192
+ alignSelf: "center",
193
+ marginVertical: 6 * ratio
194
+ },
195
+ bestOfferContainer: {
196
+ position: "absolute",
197
+ bottom: -5 * ratio,
198
+ left: 6 * ratio,
199
+ right: 50 * ratio,
200
+ flexDirection: "row",
201
+ alignItems: "center"
202
+ },
203
+ discountText: {
204
+ fontSize: (0, _AppConstant.normalizeFont)(12),
205
+ color: "#7C3AED",
206
+ marginBottom: 1 * ratio,
207
+ fontFamily: _fontUtils.FONTS.SemiBold
208
+ },
209
+ radioButton: {
210
+ width: 20 * ratio,
211
+ height: 20 * ratio,
212
+ borderRadius: 50 * ratio,
213
+ backgroundColor: "#564372",
214
+ justifyContent: "center",
215
+ alignItems: "center"
216
+ },
217
+ selectedRadioButton: {
218
+ backgroundColor: "#EC4899"
219
+ },
220
+ radioButtonInner: {
221
+ width: 6 * ratio,
222
+ height: 6 * ratio,
223
+ borderRadius: 4 * ratio,
224
+ backgroundColor: "#564372"
225
+ },
226
+ selectedRadioInner: {
227
+ backgroundColor: "#ffffffff"
228
+ },
229
+ chooseButton: {
230
+ backgroundColor: "#EC4899",
231
+ borderRadius: 5 * ratio,
232
+ height: 46 * ratio,
233
+ justifyContent: "center",
234
+ alignItems: "center",
235
+ marginTop: 6 * ratio,
236
+ paddingHorizontal: 20
237
+ },
238
+ dicountedPriceWrapper: {
239
+ flexDirection: "row",
240
+ gap: 4 * ratio
241
+ },
242
+ discountedPriceText: {
243
+ fontSize: (0, _AppConstant.normalizeFont)(14),
244
+ textDecorationLine: "line-through",
245
+ fontFamily: _fontUtils.FONTS.Medium
246
+ },
247
+ disabledButton: {
248
+ backgroundColor: "#8e80a1"
249
+ },
250
+ expandButtonText: {
251
+ fontSize: (0, _AppConstant.normalizeFont)(12),
252
+ textAlign: "center",
253
+ fontFamily: _fontUtils.FONTS.SemiBold,
254
+ marginTop: 2 * ratio
255
+ },
256
+ bestTenureMarkContainer: {
257
+ alignSelf: "center",
258
+ marginRight: 5
259
+ },
260
+ bestTenureThumbsUp: {
261
+ width: 21 * ratio,
262
+ height: 21 * ratio
263
+ },
264
+ arrowSvgContainer: {
265
+ width: 16 * ratio,
266
+ height: 16 * ratio,
267
+ backgroundColor: "#E10092",
268
+ borderRadius: 510 * ratio,
269
+ justifyContent: "center",
270
+ alignItems: "center"
271
+ },
272
+ arrowSvg: {
273
+ width: 11 * ratio,
274
+ height: 6 * ratio
275
+ },
276
+ expandedArrowSvg: {
277
+ transform: [{
278
+ rotate: "180deg"
279
+ }]
280
+ },
281
+ regionalnSportsHeading: {
282
+ fontSize: (0, _AppConstant.normalizeFont)(20),
283
+ color: "#130036",
284
+ textAlign: "center",
285
+ fontFamily: _fontUtils.FONTS.SemiBold
286
+ },
287
+ titleAndImageWrapper: {
288
+ justifyContent: "center",
289
+ alignItems: "center"
290
+ },
291
+ regionalnSportsAppsHeading: {
292
+ fontSize: (0, _AppConstant.normalizeFont)(24),
293
+ color: "#130036",
294
+ textAlign: "center",
295
+ marginTop: 4 * ratio,
296
+ fontFamily: _fontUtils.FONTS.SemiBold
297
+ },
298
+ regionalnSportsImageContainer: {
299
+ width: 184 * ratio,
300
+ height: 64 * ratio,
301
+ justifyContent: "center",
302
+ alignItems: "center",
303
+ marginTop: 12 * ratio,
304
+ marginBottom: 10 * ratio
305
+ },
306
+ regionalImage: {
307
+ width: 184 * ratio,
308
+ height: 64 * ratio
309
+ },
310
+ regionalAppRow: {
311
+ marginVertical: 8 * ratio,
312
+ justifyContent: "center"
313
+ },
314
+ deviceImageAndTitle: {
315
+ flexDirection: "row",
316
+ alignItems: "center",
317
+ alignSelf: "baseline"
318
+ },
319
+ validDate: {
320
+ fontSize: (0, _AppConstant.normalizeFont)(12),
321
+ color: "#130036",
322
+ fontFamily: _fontUtils.FONTS.Medium,
323
+ marginBottom: 10 * ratio
324
+ },
325
+ planInclude: {
326
+ fontSize: (0, _AppConstant.normalizeFont)(18),
327
+ color: "#130036",
328
+ textAlign: "center",
329
+ fontFamily: _fontUtils.FONTS.Medium
330
+ },
331
+ currentPlanHeadingContainer: {
332
+ flexDirection: "row",
333
+ justifyContent: "center",
334
+ alignItems: "center"
335
+ },
336
+ appCountAndPrice: {
337
+ fontSize: (0, _AppConstant.normalizeFont)(22),
338
+ color: "#130036",
339
+ textAlign: "center",
340
+ fontFamily: _fontUtils.FONTS.SemiBold,
341
+ marginVertical: 6
342
+ },
343
+ innerContainer: {
344
+ width: "100%",
345
+ alignItems: "center"
346
+ },
347
+ textDivider: {
348
+ fontFamily: _fontUtils.FONTS.SemiBold
349
+ },
350
+ currentPlanAppRowPadding: {
351
+ paddingHorizontal: 35 * ratio
352
+ },
353
+ tenureNdButtonContainer: {
354
+ width: "100%",
355
+ alignItems: "center"
356
+ },
357
+ flexDirectionRow: {
358
+ flexDirection: "row"
359
+ },
360
+ strikeThrough: {
361
+ fontSize: (0, _AppConstant.normalizeFont)(22),
362
+ textDecorationLine: "line-through"
363
+ },
364
+ offerDetails: {
365
+ fontSize: (0, _AppConstant.normalizeFont)(32),
366
+ fontFamily: _fontUtils.FONTS.Bold,
367
+ letterSpacing: 1 * ratio,
368
+ marginTop: 4 * ratio,
369
+ lineHeight: (0, _AppConstant.normalizeFont)(34)
370
+ }
371
+ });