@moneylion/react-native-offer-carousel 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/lib/commonjs/components/Button/index.js +2 -1
  2. package/lib/commonjs/components/Button/index.js.map +1 -1
  3. package/lib/commonjs/components/Common/BaseOfferCard/index.js +17 -6
  4. package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -1
  5. package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js +6 -3
  6. package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js.map +1 -1
  7. package/lib/commonjs/components/Common/DynamicOfferCard/index.js +2 -1
  8. package/lib/commonjs/components/Common/DynamicOfferCard/index.js.map +1 -1
  9. package/lib/commonjs/components/Divider/index.js +0 -2
  10. package/lib/commonjs/components/Divider/index.js.map +1 -1
  11. package/lib/commonjs/components/DynamicOffers/DynamicOffers.js +0 -2
  12. package/lib/commonjs/components/DynamicOffers/DynamicOffers.js.map +1 -1
  13. package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js +3 -22
  14. package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js.map +1 -1
  15. package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js +6 -15
  16. package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -1
  17. package/lib/commonjs/components/DynamicOffers/SeeAllButton.js +2 -1
  18. package/lib/commonjs/components/DynamicOffers/SeeAllButton.js.map +1 -1
  19. package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js +2 -1
  20. package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js.map +1 -1
  21. package/lib/commonjs/components/Modal/AllOffersModal.js +7 -4
  22. package/lib/commonjs/components/Modal/AllOffersModal.js.map +1 -1
  23. package/lib/commonjs/components/Modal/DescriptionPoints.js +2 -1
  24. package/lib/commonjs/components/Modal/DescriptionPoints.js.map +1 -1
  25. package/lib/commonjs/components/Modal/Disclaimer.js +2 -1
  26. package/lib/commonjs/components/Modal/Disclaimer.js.map +1 -1
  27. package/lib/commonjs/components/Modal/OfferDetailsModal.js +13 -8
  28. package/lib/commonjs/components/Modal/OfferDetailsModal.js.map +1 -1
  29. package/lib/commonjs/components/MoneyLionOfferCarousel.js +2 -8
  30. package/lib/commonjs/components/MoneyLionOfferCarousel.js.map +1 -1
  31. package/lib/commonjs/components/Text/index.js +3 -1
  32. package/lib/commonjs/components/Text/index.js.map +1 -1
  33. package/lib/commonjs/components/Touchable/TouchableOpacity.js +12 -0
  34. package/lib/commonjs/components/Touchable/TouchableOpacity.js.map +1 -0
  35. package/lib/commonjs/components/Touchable/index.js +29 -0
  36. package/lib/commonjs/components/Touchable/index.js.map +1 -0
  37. package/lib/commonjs/components/utils/withTestID.js +55 -0
  38. package/lib/commonjs/components/utils/withTestID.js.map +1 -0
  39. package/lib/commonjs/pageData.js +1 -5
  40. package/lib/commonjs/pageData.js.map +1 -1
  41. package/lib/commonjs/services/getDynamicOffers.js +1 -3
  42. package/lib/commonjs/services/getDynamicOffers.js.map +1 -1
  43. package/lib/commonjs/utils/index.js +0 -11
  44. package/lib/commonjs/utils/index.js.map +1 -1
  45. package/lib/module/components/Button/index.js +2 -1
  46. package/lib/module/components/Button/index.js.map +1 -1
  47. package/lib/module/components/Common/BaseOfferCard/index.js +17 -6
  48. package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -1
  49. package/lib/module/components/Common/DynamicOfferCard/SeeMore.js +6 -3
  50. package/lib/module/components/Common/DynamicOfferCard/SeeMore.js.map +1 -1
  51. package/lib/module/components/Common/DynamicOfferCard/index.js +2 -1
  52. package/lib/module/components/Common/DynamicOfferCard/index.js.map +1 -1
  53. package/lib/module/components/Divider/index.js +0 -2
  54. package/lib/module/components/Divider/index.js.map +1 -1
  55. package/lib/module/components/DynamicOffers/DynamicOffers.js +0 -2
  56. package/lib/module/components/DynamicOffers/DynamicOffers.js.map +1 -1
  57. package/lib/module/components/DynamicOffers/DynamicOffersContainer.js +3 -22
  58. package/lib/module/components/DynamicOffers/DynamicOffersContainer.js.map +1 -1
  59. package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js +6 -15
  60. package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -1
  61. package/lib/module/components/DynamicOffers/SeeAllButton.js +2 -1
  62. package/lib/module/components/DynamicOffers/SeeAllButton.js.map +1 -1
  63. package/lib/module/components/Layouts/DefaultOfferCard/index.js +2 -1
  64. package/lib/module/components/Layouts/DefaultOfferCard/index.js.map +1 -1
  65. package/lib/module/components/Modal/AllOffersModal.js +6 -3
  66. package/lib/module/components/Modal/AllOffersModal.js.map +1 -1
  67. package/lib/module/components/Modal/DescriptionPoints.js +2 -1
  68. package/lib/module/components/Modal/DescriptionPoints.js.map +1 -1
  69. package/lib/module/components/Modal/Disclaimer.js +2 -1
  70. package/lib/module/components/Modal/Disclaimer.js.map +1 -1
  71. package/lib/module/components/Modal/OfferDetailsModal.js +13 -8
  72. package/lib/module/components/Modal/OfferDetailsModal.js.map +1 -1
  73. package/lib/module/components/MoneyLionOfferCarousel.js +2 -8
  74. package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
  75. package/lib/module/components/Text/index.js +3 -1
  76. package/lib/module/components/Text/index.js.map +1 -1
  77. package/lib/module/components/Touchable/TouchableOpacity.js +5 -0
  78. package/lib/module/components/Touchable/TouchableOpacity.js.map +1 -0
  79. package/lib/module/components/Touchable/index.js +3 -0
  80. package/lib/module/components/Touchable/index.js.map +1 -0
  81. package/lib/module/components/utils/withTestID.js +50 -0
  82. package/lib/module/components/utils/withTestID.js.map +1 -0
  83. package/lib/module/pageData.js +2 -6
  84. package/lib/module/pageData.js.map +1 -1
  85. package/lib/module/services/getDynamicOffers.js +1 -3
  86. package/lib/module/services/getDynamicOffers.js.map +1 -1
  87. package/lib/module/utils/index.js +0 -1
  88. package/lib/module/utils/index.js.map +1 -1
  89. package/lib/typescript/src/components/Button/index.d.ts +3 -2
  90. package/lib/typescript/src/components/Button/index.d.ts.map +1 -1
  91. package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -1
  92. package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts +2 -1
  93. package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts.map +1 -1
  94. package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts.map +1 -1
  95. package/lib/typescript/src/components/Divider/index.d.ts.map +1 -1
  96. package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts +1 -3
  97. package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts.map +1 -1
  98. package/lib/typescript/src/components/DynamicOffers/DynamicOffersContainer.d.ts +1 -4
  99. package/lib/typescript/src/components/DynamicOffers/DynamicOffersContainer.d.ts.map +1 -1
  100. package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts +1 -3
  101. package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -1
  102. package/lib/typescript/src/components/DynamicOffers/SeeAllButton.d.ts.map +1 -1
  103. package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -1
  104. package/lib/typescript/src/components/Modal/AllOffersModal.d.ts.map +1 -1
  105. package/lib/typescript/src/components/Modal/DescriptionPoints.d.ts.map +1 -1
  106. package/lib/typescript/src/components/Modal/Disclaimer.d.ts.map +1 -1
  107. package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -1
  108. package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts +0 -2
  109. package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts.map +1 -1
  110. package/lib/typescript/src/components/Text/index.d.ts +2 -1
  111. package/lib/typescript/src/components/Text/index.d.ts.map +1 -1
  112. package/lib/typescript/src/components/Touchable/TouchableOpacity.d.ts +7 -0
  113. package/lib/typescript/src/components/Touchable/TouchableOpacity.d.ts.map +1 -0
  114. package/lib/typescript/src/components/Touchable/index.d.ts +3 -0
  115. package/lib/typescript/src/components/Touchable/index.d.ts.map +1 -0
  116. package/lib/typescript/src/components/utils/withTestID.d.ts +4 -0
  117. package/lib/typescript/src/components/utils/withTestID.d.ts.map +1 -0
  118. package/lib/typescript/src/pageData.d.ts +0 -1
  119. package/lib/typescript/src/pageData.d.ts.map +1 -1
  120. package/lib/typescript/src/services/getDynamicOffers.d.ts +1 -3
  121. package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
  122. package/lib/typescript/src/utils/index.d.ts +0 -1
  123. package/lib/typescript/src/utils/index.d.ts.map +1 -1
  124. package/package.json +1 -1
  125. package/src/components/Button/index.tsx +6 -3
  126. package/src/components/Common/BaseOfferCard/index.tsx +17 -8
  127. package/src/components/Common/DynamicOfferCard/SeeMore.tsx +9 -2
  128. package/src/components/Common/DynamicOfferCard/index.tsx +1 -0
  129. package/src/components/Divider/index.tsx +0 -1
  130. package/src/components/DynamicOffers/DynamicOffers.tsx +0 -4
  131. package/src/components/DynamicOffers/DynamicOffersContainer.tsx +2 -21
  132. package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +16 -28
  133. package/src/components/DynamicOffers/SeeAllButton.tsx +1 -0
  134. package/src/components/Layouts/DefaultOfferCard/index.tsx +1 -0
  135. package/src/components/Modal/AllOffersModal.tsx +3 -1
  136. package/src/components/Modal/DescriptionPoints.tsx +6 -1
  137. package/src/components/Modal/Disclaimer.tsx +6 -1
  138. package/src/components/Modal/OfferDetailsModal.tsx +12 -6
  139. package/src/components/MoneyLionOfferCarousel.tsx +2 -6
  140. package/src/components/Text/index.tsx +7 -2
  141. package/src/components/Touchable/TouchableOpacity.tsx +15 -0
  142. package/src/components/Touchable/index.ts +2 -0
  143. package/src/components/utils/withTestID.tsx +56 -0
  144. package/src/pageData.ts +0 -6
  145. package/src/services/getDynamicOffers.ts +1 -5
  146. package/src/utils/index.ts +0 -1
  147. package/lib/commonjs/utils/getOffersBasedOnLayout.js +0 -48
  148. package/lib/commonjs/utils/getOffersBasedOnLayout.js.map +0 -1
  149. package/lib/commonjs/utils/layouts.js +0 -27
  150. package/lib/commonjs/utils/layouts.js.map +0 -1
  151. package/lib/module/utils/getOffersBasedOnLayout.js +0 -39
  152. package/lib/module/utils/getOffersBasedOnLayout.js.map +0 -1
  153. package/lib/module/utils/layouts.js +0 -20
  154. package/lib/module/utils/layouts.js.map +0 -1
  155. package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts +0 -26
  156. package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts.map +0 -1
  157. package/lib/typescript/src/utils/layouts.d.ts +0 -19
  158. package/lib/typescript/src/utils/layouts.d.ts.map +0 -1
  159. package/src/utils/getOffersBasedOnLayout.ts +0 -51
  160. package/src/utils/layouts.ts +0 -22
@@ -1 +1 @@
1
- {"version":3,"file":"MoneyLionOfferCarousel.d.ts","sourceRoot":"","sources":["../../../../src/components/MoneyLionOfferCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAI5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMvC,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAEN,KAAK,uBAAuB,EAC5B,MAAM,iCAAiC,CAAC;AAQzC,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AAiQF,eAAO,MAAM,sBAAsB,UAC3B,2BAA2B,GACjC,KAAK,uBAAuB,EAAE,eAAe,GAAG,UAAU,CAAC,sBAa5D,CAAC"}
1
+ {"version":3,"file":"MoneyLionOfferCarousel.d.ts","sourceRoot":"","sources":["../../../../src/components/MoneyLionOfferCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAEN,KAAK,uBAAuB,EAC5B,MAAM,iCAAiC,CAAC;AAQzC,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AA+PF,eAAO,MAAM,sBAAsB,UAC3B,2BAA2B,GACjC,KAAK,uBAAuB,EAAE,eAAe,GAAG,UAAU,CAAC,sBAa5D,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { type TextStyle, type StyleProp, type TextProps as RNTextProps } from "react-native";
2
+ import { Text as RNText, type TextStyle, type StyleProp, type TextProps as RNTextProps } from "react-native";
3
3
  import { type ThemeColors } from "../../context/ThemeProvider";
4
4
  export type Variant = "title-1" | "title-2" | "title-3" | "title-4" | "title-5" | "title-6" | "featured-1" | "featured-2" | "featured-3" | "body-1" | "body-2" | "body-3" | "caption-1" | "caption-2";
5
5
  export type TextDecoration = "line-through";
@@ -12,6 +12,7 @@ export interface TextProps extends Omit<RNTextProps, "style"> {
12
12
  children?: React.ReactNode;
13
13
  style?: StyleProp<TextStyle>;
14
14
  }
15
+ export type TextRef = React.ElementRef<typeof RNText>;
15
16
  declare const Text: React.FC<TextProps>;
16
17
  export default Text;
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGN,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,IAAI,WAAW,EAC7B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAGzE,MAAM,MAAM,OAAO,GAChB,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,WAAW,CAAC;AAGf,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC;AAG5C,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAGtD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,WAAW,CAAC;IAC1B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC7B;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAgD7B,CAAC;AAwEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACN,IAAI,IAAI,MAAM,EAEd,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,IAAI,WAAW,EAC7B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAIzE,MAAM,MAAM,OAAO,GAChB,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,WAAW,CAAC;AAGf,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC;AAG5C,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAGtD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,WAAW,CAAC;IAC1B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC7B;AAED,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AAItD,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAgD7B,CAAC;AAwEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { TouchableOpacity as RNTouchableOpacity } from "react-native";
3
+ export type TouchableOpacityProps = React.ComponentProps<typeof RNTouchableOpacity>;
4
+ export type TouchableOpacityRef = React.ElementRef<typeof RNTouchableOpacity>;
5
+ declare const TouchableOpacity: import("react").ForwardRefExoticComponent<import("react-native").TouchableOpacityProps & Pick<import("react-native").AccessibilityProps, "accessibilityLabel"> & Pick<import("react-native").ViewProps, "testID"> & import("react").RefAttributes<RNTouchableOpacity>>;
6
+ export default TouchableOpacity;
7
+ //# sourceMappingURL=TouchableOpacity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TouchableOpacity.d.ts","sourceRoot":"","sources":["../../../../../src/components/Touchable/TouchableOpacity.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,IAAI,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAItE,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CACvD,OAAO,kBAAkB,CACzB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9E,QAAA,MAAM,gBAAgB,wQAErB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as TouchableOpacity } from "./TouchableOpacity";
2
+ export * from "./TouchableOpacity";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Touchable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ declare function withTestID<P extends object, R = unknown>(Component: React.ComponentType<P & React.RefAttributes<R>>): React.ForwardRefExoticComponent<React.PropsWithoutRef<P & Pick<import("react-native").AccessibilityProps, "accessibilityLabel"> & Pick<import("react-native").ViewProps, "testID">> & React.RefAttributes<R>>;
3
+ export default withTestID;
4
+ //# sourceMappingURL=withTestID.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withTestID.d.ts","sourceRoot":"","sources":["../../../../../src/components/utils/withTestID.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA8B1B,iBAAS,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,GAAG,OAAO,EAChD,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,iNAqB1D;AAGD,eAAe,UAAU,CAAC"}
@@ -15,7 +15,6 @@ export declare function getPageData({ context, params, onRateTableSubmit, }: Get
15
15
  currentCountry: string | undefined;
16
16
  showCardBorder: boolean | undefined;
17
17
  showProductTypeLabel: boolean | undefined;
18
- displayLayout: "fixed" | "carousel";
19
18
  }>;
20
19
  export {};
21
20
  //# sourceMappingURL=pageData.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pageData.d.ts","sourceRoot":"","sources":["../../../src/pageData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAC;AAGvF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAW7E,KAAK,gBAAgB,GAAG;IACvB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,2BAA2B,CAAC;IACpC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC5D,CAAC;AAEF,wBAAsB,WAAW,CAAC,EACjC,OAAO,EACP,MAAM,EACN,iBAAiB,GACjB,EAAE,gBAAgB;;;;;;;;;;GA4ElB"}
1
+ {"version":3,"file":"pageData.d.ts","sourceRoot":"","sources":["../../../src/pageData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAC;AAGvF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAU7E,KAAK,gBAAgB,GAAG;IACvB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,2BAA2B,CAAC;IACpC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC5D,CAAC;AAEF,wBAAsB,WAAW,CAAC,EACjC,OAAO,EACP,MAAM,EACN,iBAAiB,GACjB,EAAE,gBAAgB;;;;;;;;;GAuElB"}
@@ -1,10 +1,8 @@
1
- import { type Layout } from "../utils";
2
1
  import type { GetProductTypesProps, ProductTypesResult } from "./getProductTypes";
3
2
  import type { PartnerOverride, ProductTypeDefinition } from "../capabilities/offer-catalog/src";
4
3
  import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
5
4
  export type GetDynamicOffersProps = {
6
5
  tags: string;
7
- displayLayout: Layout;
8
6
  productTypes: string[];
9
7
  resultType: ProductTypesResult["resultType"];
10
8
  isCachedOffersRequest: boolean;
@@ -18,7 +16,7 @@ export type GetDynamicOffersProps = {
18
16
  * @param {GetDynamicOffersProps} params - The parameters for retrieving dynamic offers.
19
17
  * @returns {Promise<{ productTypeDisplayName: string; offers: typeof offers }>} An object containing the product type display name and the offers.
20
18
  */
21
- export declare const getDynamicOffers: ({ tags, displayLayout, defaultProductType, productTypes, resultType, isCachedOffersRequest, productTypesDefinition, partnersOverrideDefinition, context, }: Omit<GetDynamicOffersProps, "isDev">) => Promise<{
19
+ export declare const getDynamicOffers: ({ tags, defaultProductType, productTypes, resultType, isCachedOffersRequest, productTypesDefinition, partnersOverrideDefinition, context, }: Omit<GetDynamicOffersProps, "isDev">) => Promise<{
22
20
  offers: import("../capabilities/offer-catalog/src").BaseOffer[];
23
21
  isError: boolean | undefined;
24
22
  errorCode: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"getDynamicOffers.d.ts","sourceRoot":"","sources":["../../../../src/services/getDynamicOffers.ts"],"names":[],"mappings":"AACA,OAAO,EAIN,KAAK,MAAM,EACX,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EACX,oBAAoB,EACpB,kBAAkB,EAClB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,KAAK,EACX,eAAe,EACf,qBAAqB,EACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAExF,MAAM,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC7C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,0BAA0B,EAAE,eAAe,EAAE,CAAC;IAC9C,OAAO,EAAE,UAAU,CAAC;CACpB,GAAG,IAAI,CACP,oBAAoB,EAClB,SAAS,GACT,kBAAkB,GAClB,OAAO,GACP,WAAW,GACX,UAAU,GACV,gBAAgB,CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,+JAU1B,KAAK,qBAAqB,EAAE,OAAO,CAAC;;;;;;EA6CtC,CAAC"}
1
+ {"version":3,"file":"getDynamicOffers.d.ts","sourceRoot":"","sources":["../../../../src/services/getDynamicOffers.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACX,oBAAoB,EACpB,kBAAkB,EAClB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EACX,eAAe,EACf,qBAAqB,EACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAExF,MAAM,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC7C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,0BAA0B,EAAE,eAAe,EAAE,CAAC;IAC9C,OAAO,EAAE,UAAU,CAAC;CACpB,GAAG,IAAI,CACP,oBAAoB,EAClB,SAAS,GACT,kBAAkB,GAClB,OAAO,GACP,WAAW,GACX,UAAU,GACV,gBAAgB,CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,gJAS1B,KAAK,qBAAqB,EAAE,OAAO,CAAC;;;;;;EA6CtC,CAAC"}
@@ -2,7 +2,6 @@ export * from "./addClientTagsToOfferLinks";
2
2
  export * from "./getDefaultProductType";
3
3
  export * from "./getOffersByProductTypes";
4
4
  export * from "./getProductTypesDefinition";
5
- export * from "./layouts";
6
5
  export * from "./resolveProductTypes";
7
6
  export * from "./selectDynamicOffers";
8
7
  export * from "./sortOffersByRecommendationScore";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneylion/react-native-offer-carousel",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "React Native components for the Engine by MoneyLion Mobile SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -1,15 +1,18 @@
1
1
  import React, { forwardRef, type ReactNode } from "react";
2
2
  import {
3
- TouchableOpacity,
4
3
  View,
5
4
  StyleSheet,
6
5
  ActivityIndicator,
7
6
  type StyleProp,
8
7
  type ViewStyle,
9
- type TouchableOpacityProps,
10
8
  } from "react-native";
11
9
  import { useTheme, type ThemeColors } from "../../context/ThemeProvider";
12
10
  import Text, { type Variant } from "../Text";
11
+ import {
12
+ TouchableOpacity,
13
+ type TouchableOpacityProps,
14
+ type TouchableOpacityRef,
15
+ } from "../Touchable";
13
16
 
14
17
  // Helper function to determine text color based on background color
15
18
  const getContrastColor = (hexColor: string): string => {
@@ -42,7 +45,7 @@ export interface ButtonProps extends TouchableOpacityProps {
42
45
  textFontWeight?: "normal" | "medium" | "bold";
43
46
  }
44
47
 
45
- const Button = forwardRef<TouchableOpacity, ButtonProps>((props, ref) => {
48
+ const Button = forwardRef<TouchableOpacityRef, ButtonProps>((props, ref) => {
46
49
  const {
47
50
  color,
48
51
  highlighted = false,
@@ -11,6 +11,7 @@ import { Dimensions, StyleSheet } from "react-native";
11
11
  import { ThumborImage } from "../../../capabilities/ui/elements/src";
12
12
  import { arrayToMarkdownList } from "../../../capabilities/offer-catalog/src";
13
13
  import { MarkdownText } from "../../../capabilities/ui/elements/src/components/MarkdownText";
14
+ import { useTheme } from "../../../context/ThemeProvider";
14
15
 
15
16
  const CardWidth = 282;
16
17
 
@@ -24,7 +25,7 @@ const BaseOfferCard = ({
24
25
 
25
26
  return (
26
27
  <View
27
- borderColor={showCardBorder ? "borderNeutralFaded" : undefined}
28
+ borderColor={showCardBorder ? "borderNeutral" : undefined}
28
29
  direction={"column"}
29
30
  backgroundColor={"backgroundElevationBase"}
30
31
  width={fullCardWidth ? screenWidth - 32 : CardWidth} // 32 = left(16) + right(16) margin of the card
@@ -118,13 +119,18 @@ const PartnerImage = (
118
119
  );
119
120
  };
120
121
 
121
- const TopContainer = ({ children, ...viewProps }: ViewProps) => (
122
- <View {...viewProps} gap={3} direction={"column"}>
123
- {children}
122
+ const TopContainer = ({ children, ...viewProps }: ViewProps) => {
123
+ const themeContext = useTheme();
124
+ const theme = themeContext?.theme || {};
124
125
 
125
- <Divider />
126
- </View>
127
- );
126
+ return (
127
+ <View {...viewProps} gap={3} direction={"column"}>
128
+ {children}
129
+
130
+ <Divider color={theme.borderNeutral} />
131
+ </View>
132
+ );
133
+ };
128
134
 
129
135
  const TopBar = ({ children, ...viewProps }: ViewProps) => (
130
136
  <View
@@ -211,6 +217,9 @@ const DescriptionHandler = ({
211
217
  contentDescription?: string;
212
218
  hasDivider?: boolean;
213
219
  }) => {
220
+ const themeContext = useTheme();
221
+ const theme = themeContext?.theme || {};
222
+
214
223
  const renderContentDescription = () => {
215
224
  if (descriptionPoints.length > 0) {
216
225
  return (
@@ -236,7 +245,7 @@ const DescriptionHandler = ({
236
245
 
237
246
  return (
238
247
  <View gap={3} direction={"column"}>
239
- {hasDivider && <Divider />}
248
+ {hasDivider && <Divider color={theme.borderNeutral} />}
240
249
  {renderContentDescription()}
241
250
  </View>
242
251
  );
@@ -1,21 +1,24 @@
1
1
  import React, { useCallback, useState } from "react";
2
2
  import Text from "../../Text";
3
- import { TouchableOpacity, StyleSheet } from "react-native";
3
+ import { StyleSheet } from "react-native";
4
4
  import { OfferDetailsModal } from "../../Modal/OfferDetailsModal";
5
5
  import { useEventHandler } from "../../../context/EventHandlerProvider";
6
6
  import type { BaseOffer } from "../../../capabilities/offer-catalog/src";
7
7
  import { getEventCallbackContext } from "../../../capabilities/offer-catalog/src/utils/getEventCallbackContext";
8
+ import { TouchableOpacity } from "../../Touchable";
8
9
 
9
10
  export type SeeMoreProps = {
10
11
  offer: BaseOffer;
11
12
  offerIndex: number;
12
13
  isHorizontalScroll?: boolean;
14
+ testID?: string;
13
15
  };
14
16
 
15
17
  export const SeeMore = ({
16
18
  offer,
17
19
  offerIndex,
18
20
  isHorizontalScroll = true,
21
+ testID,
19
22
  }: SeeMoreProps) => {
20
23
  const [modalVisible, setModalVisible] = useState(false);
21
24
  const {
@@ -59,7 +62,11 @@ export const SeeMore = ({
59
62
 
60
63
  return (
61
64
  <>
62
- <TouchableOpacity onPress={handleMoreInfoClick} style={styles.container}>
65
+ <TouchableOpacity
66
+ onPress={handleMoreInfoClick}
67
+ style={styles.container}
68
+ testID={testID}
69
+ >
63
70
  <Text
64
71
  variant={"body-3"}
65
72
  color={"foregroundNeutral"}
@@ -53,6 +53,7 @@ function DynamicOfferCard({
53
53
  style={styles.cta}
54
54
  context={getEventCallbackContext(isHorizontalScroll)}
55
55
  offerIndex={offerIndex}
56
+ testID="offer_carousel.dynamic_offer_card.cta"
56
57
  >
57
58
  {"Continue"}
58
59
  </CallToAction>
@@ -27,7 +27,6 @@ const styles = StyleSheet.create({
27
27
  divider: {
28
28
  height: 1,
29
29
  width: "100%",
30
- backgroundColor: "#E0E0E0", // Default neutral border color
31
30
  marginVertical: 12,
32
31
  },
33
32
  });
@@ -2,13 +2,11 @@ import React from "react";
2
2
  import { productTypeBuilder } from "../../builder/builder";
3
3
  import { DynamicOffersRender, FallbackOfferTemplate } from "./Render";
4
4
  import type { DynamicOffersRenderProps } from "./Render/DynamicOffersRender";
5
- import type { Layout } from "../../utils";
6
5
  import { View } from "react-native";
7
6
 
8
7
  export type DynamicOfferProps = {
9
8
  title?: string;
10
9
  subtitle?: string;
11
- displayLayout: Layout;
12
10
  showCardBorder: boolean;
13
11
  showProductTypeLabel?: boolean;
14
12
  shouldHideFooter: boolean;
@@ -24,7 +22,6 @@ export type DynamicOfferProps = {
24
22
  export const DynamicOffers = ({
25
23
  title,
26
24
  subtitle,
27
- displayLayout,
28
25
  showCardBorder,
29
26
  showProductTypeLabel,
30
27
  // shouldHideFooter,
@@ -48,7 +45,6 @@ export const DynamicOffers = ({
48
45
  title={title}
49
46
  subtitle={subtitle}
50
47
  offers={offers}
51
- displayLayout={displayLayout}
52
48
  fallbackTemplate={FallbackOfferTemplate}
53
49
  productTypeBuilder={productTypeBuilder}
54
50
  showCardBorder={showCardBorder}
@@ -1,34 +1,15 @@
1
1
  import React, { Suspense } from "react";
2
- import { match } from "ts-pattern";
3
- import type { Layout } from "../../utils";
4
2
  import { DynamicOffers, type DynamicOfferProps } from "./DynamicOffers";
5
3
  import Skeleton from "../Skeleton";
6
- import { View, StyleSheet } from "react-native";
7
4
 
8
- export const DynamicOfferSkeleton = React.memo(
9
- ({ displayLayout = "carousel" }: { displayLayout?: Layout }) =>
10
- match(displayLayout)
11
- .with("fixed", () => <Skeleton height={300} />)
12
- .otherwise(() => (
13
- <View style={styles.skeletonContainer}>
14
- <Skeleton height={10} width={73} />
15
- <Skeleton height={300} />
16
- </View>
17
- ))
18
- );
5
+ export const DynamicOfferSkeleton = React.memo(() => <Skeleton height={300} />);
19
6
 
20
7
  export const DynamicOffersContainer = React.memo(
21
8
  ({ config }: { config: DynamicOfferProps }) => {
22
9
  return (
23
- <Suspense
24
- fallback={<DynamicOfferSkeleton displayLayout={config.displayLayout} />}
25
- >
10
+ <Suspense fallback={<DynamicOfferSkeleton />}>
26
11
  <DynamicOffers {...config} />
27
12
  </Suspense>
28
13
  );
29
14
  }
30
15
  );
31
-
32
- const styles = StyleSheet.create({
33
- skeletonContainer: { gap: 2, width: "100%" },
34
- });
@@ -5,7 +5,6 @@ import React, {
5
5
  useRef,
6
6
  useState,
7
7
  } from "react";
8
- import type { Layout } from "../../../utils";
9
8
  import { productTypeBuilder as builder } from "../../../builder/builder";
10
9
  import { Offer } from "./Offer";
11
10
  import {
@@ -29,7 +28,6 @@ export type DynamicOffersRenderProps = {
29
28
  title?: string;
30
29
  subtitle?: string;
31
30
  offers: BaseOffer[];
32
- displayLayout: Layout;
33
31
  fallbackTemplate?: React.FC<{
34
32
  offer: BaseOffer;
35
33
  showProductTypeLabel?: boolean;
@@ -50,7 +48,6 @@ export const DynamicOffersRender = ({
50
48
  title,
51
49
  subtitle,
52
50
  offers,
53
- displayLayout,
54
51
  productTypeBuilder = builder,
55
52
  fallbackTemplate,
56
53
  showCardBorder,
@@ -268,32 +265,18 @@ export const DynamicOffersRender = ({
268
265
  const fullCardWidth = offers.length === 1 || !isHorizontalScroll;
269
266
 
270
267
  // Create offer components
271
- return displayLayout === "fixed"
272
- ? [
273
- // <VideosCard key="videos-card" videosContent={videosContent} showCardBorder={showCardBorder} />,
274
- ...Offer({
275
- productTypeBuilder,
276
- offers,
277
- showProductTypeLabel,
278
- fallbackTemplate,
279
- showCardBorder,
280
- fullCardWidth,
281
- isHorizontalScroll,
282
- }),
283
- ]
284
- : Offer({
285
- productTypeBuilder,
286
- offers,
287
- showProductTypeLabel,
288
- fallbackTemplate,
289
- showCardBorder,
290
- fullCardWidth,
291
- isHorizontalScroll,
292
- });
268
+ return Offer({
269
+ productTypeBuilder,
270
+ offers,
271
+ showProductTypeLabel,
272
+ fallbackTemplate,
273
+ showCardBorder,
274
+ fullCardWidth,
275
+ isHorizontalScroll,
276
+ });
293
277
  }, [
294
278
  offers,
295
279
  isHorizontalScroll,
296
- displayLayout,
297
280
  productTypeBuilder,
298
281
  showProductTypeLabel,
299
282
  fallbackTemplate,
@@ -348,7 +331,6 @@ export const DynamicOffersRender = ({
348
331
  const config = {
349
332
  title,
350
333
  subtitle,
351
- displayLayout,
352
334
  showCardBorder,
353
335
  showProductTypeLabel,
354
336
  shouldHideFooter: false,
@@ -369,7 +351,12 @@ export const DynamicOffersRender = ({
369
351
  {showHeaderText && (
370
352
  <View style={styles.headerTextContainer}>
371
353
  {showTitle && (
372
- <Text variant="featured-3" weight="bold">
354
+ <Text
355
+ variant="featured-3"
356
+ weight="bold"
357
+ color="foregroundNeutral"
358
+ testID="offer_carousel.dynamic_offers.title"
359
+ >
373
360
  {title}
374
361
  </Text>
375
362
  )}
@@ -392,6 +379,7 @@ export const DynamicOffersRender = ({
392
379
  )}
393
380
  {isHorizontalScroll ? (
394
381
  <ScrollView
382
+ scrollEnabled={wrappedOfferComponents?.length > 1}
395
383
  horizontal={true}
396
384
  showsHorizontalScrollIndicator={false}
397
385
  contentContainerStyle={styles.contentContainer}
@@ -15,6 +15,7 @@ export const SeeAllButton = ({ onPress }: SeeAllButtonProps) => {
15
15
  textFontWeight={"bold"}
16
16
  style={styles.seeAllButton}
17
17
  onPress={onPress}
18
+ testID="offer_carousel.dynamic_offers.see_all"
18
19
  >
19
20
  {"See all"}
20
21
  </Button>
@@ -78,6 +78,7 @@ export const DefaultOfferCard = ({
78
78
  offer={offer}
79
79
  offerIndex={offerIndex}
80
80
  isHorizontalScroll={isHorizontalScroll}
81
+ testID="offer_carousel.dynamic_offer_card.see_details"
81
82
  />
82
83
  )}
83
84
  </BaseOfferCard.Stats>
@@ -4,7 +4,6 @@ import {
4
4
  View,
5
5
  SafeAreaView,
6
6
  ScrollView,
7
- TouchableOpacity,
8
7
  StyleSheet,
9
8
  Linking,
10
9
  type LayoutChangeEvent,
@@ -15,6 +14,7 @@ import Text from "../Text";
15
14
  import { DynamicOffersContainer } from "../DynamicOffers/DynamicOffersContainer";
16
15
  import type { DynamicOfferProps } from "../DynamicOffers/DynamicOffers";
17
16
  import { useTheme } from "../../context/ThemeProvider";
17
+ import { TouchableOpacity } from "../Touchable";
18
18
 
19
19
  type AllOffersModalProps = {
20
20
  visible: boolean;
@@ -114,6 +114,7 @@ export const AllOffersModal = ({
114
114
  onPress={onClose}
115
115
  style={styles.closeXButton}
116
116
  hitSlop={{ top: 15, right: 15, bottom: 15, left: 15 }}
117
+ testID="offer_carousel.all_offers_modal.close_button"
117
118
  >
118
119
  <Text style={styles.closeXText} color={"foregroundNeutral"}>
119
120
 
@@ -124,6 +125,7 @@ export const AllOffersModal = ({
124
125
  weight="bold"
125
126
  color={"foregroundNeutral"}
126
127
  style={styles.headerTitle}
128
+ testID="offer_carousel.all_offers_modal.title"
127
129
  >
128
130
  {title}
129
131
  </Text>
@@ -11,7 +11,12 @@ export function DescriptionPoints({
11
11
  }) {
12
12
  return (
13
13
  <View gap={8}>
14
- <Text variant={"body-3"} weight={"bold"} color={"foregroundNeutral"}>
14
+ <Text
15
+ variant={"body-3"}
16
+ weight={"bold"}
17
+ color={"foregroundNeutral"}
18
+ testID="offer_carousel.offer_details_modal.offer_details_title"
19
+ >
15
20
  Offer Details
16
21
  </Text>
17
22
  <MarkdownText
@@ -6,7 +6,12 @@ import { MarkdownText } from "../../capabilities/ui/elements/src/components/Mark
6
6
  export function Disclaimer({ disclaimer }: { disclaimer: string }) {
7
7
  return (
8
8
  <View gap={16}>
9
- <Text variant={"body-3"} weight={"bold"} color={"foregroundNeutral"}>
9
+ <Text
10
+ variant={"body-3"}
11
+ weight={"bold"}
12
+ color={"foregroundNeutral"}
13
+ testID="offer_carousel.offer_details_modal.provider_disclaimer_title"
14
+ >
10
15
  Provider Disclaimer
11
16
  </Text>
12
17
  <MarkdownText
@@ -4,7 +4,6 @@ import {
4
4
  View,
5
5
  SafeAreaView,
6
6
  ScrollView,
7
- TouchableOpacity,
8
7
  StyleSheet,
9
8
  StatusBar,
10
9
  Platform,
@@ -16,6 +15,7 @@ import { CallToAction } from "../Common/DynamicOfferCard/CallToAction";
16
15
  import Divider from "../Divider";
17
16
  import type { BaseOffer } from "../../capabilities/offer-catalog/src";
18
17
  import { useTheme } from "../../context/ThemeProvider";
18
+ import { TouchableOpacity } from "../Touchable";
19
19
 
20
20
  type OfferDetailsModalProps = {
21
21
  visible: boolean;
@@ -32,7 +32,7 @@ export const OfferDetailsModal = ({
32
32
  onClose,
33
33
  offerIndex,
34
34
  }: OfferDetailsModalProps) => {
35
- const { theme } = useTheme();
35
+ const { theme, isDarkTheme } = useTheme();
36
36
 
37
37
  const showDescriptionPoints = Boolean(offer?.descriptionPoints?.length);
38
38
 
@@ -45,7 +45,7 @@ export const OfferDetailsModal = ({
45
45
  return (
46
46
  <Modal
47
47
  animationType="slide"
48
- transparent={false}
48
+ transparent={true}
49
49
  visible={visible}
50
50
  onRequestClose={onClose}
51
51
  statusBarTranslucent={true}
@@ -54,15 +54,21 @@ export const OfferDetailsModal = ({
54
54
  {visible && (
55
55
  <StatusBar
56
56
  backgroundColor={backgroundColor}
57
- barStyle={"dark-content"}
57
+ barStyle={isDarkTheme ? "light-content" : "dark-content"}
58
58
  translucent={false}
59
59
  />
60
60
  )}
61
- <View style={styles.modalHeader}>
61
+ <View
62
+ style={[
63
+ styles.modalHeader,
64
+ { borderBottomColor: theme.borderNeutral },
65
+ ]}
66
+ >
62
67
  <TouchableOpacity
63
68
  onPress={onClose}
64
69
  style={styles.closeXButton}
65
70
  hitSlop={{ top: 15, right: 15, bottom: 15, left: 15 }}
71
+ testID="offer_carousel.offer_details_modal.close_button"
66
72
  >
67
73
  <Text
68
74
  style={[styles.closeXText, { color: theme.foregroundNeutral }]}
@@ -89,6 +95,7 @@ export const OfferDetailsModal = ({
89
95
  overrideUrl={offer.overrideUrl}
90
96
  style={styles.cta}
91
97
  context={"offer_details"}
98
+ testID="offer_carousel.offer_details_modal.cta"
92
99
  >
93
100
  {CTA_LABEL}
94
101
  </CallToAction>
@@ -108,7 +115,6 @@ const styles = StyleSheet.create({
108
115
  paddingHorizontal: 16,
109
116
  paddingBottom: 32,
110
117
  borderBottomWidth: 1,
111
- borderBottomColor: "#e0e0e0",
112
118
  position: "relative",
113
119
  },
114
120
  closeXButton: {
@@ -2,7 +2,6 @@ import React, { useEffect, useMemo, useState } from "react";
2
2
  import { localCnfContext } from "../config/mocks/cnfContext";
3
3
  import { Text } from "react-native";
4
4
  import { getPageData } from "../pageData";
5
- import type { Layout } from "../utils";
6
5
  import {
7
6
  DynamicOffersContainer,
8
7
  DynamicOfferSkeleton,
@@ -34,7 +33,6 @@ export type MoneyLionOfferCarouselProps = {
34
33
  productType?: string;
35
34
  query?: string;
36
35
  tags?: string;
37
- displayLayout?: Layout;
38
36
  staticProductTypes?: string;
39
37
  fontFamily?: Partial<FontFamily>;
40
38
  showProductTypeLabel?: boolean;
@@ -247,7 +245,7 @@ const InternalMoneyLionOfferCarousel = (
247
245
  );
248
246
 
249
247
  if (isLoading) {
250
- return <DynamicOfferSkeleton displayLayout={"fixed"} />;
248
+ return <DynamicOfferSkeleton />;
251
249
  }
252
250
 
253
251
  if (error) {
@@ -259,12 +257,11 @@ const InternalMoneyLionOfferCarousel = (
259
257
  }
260
258
 
261
259
  if (!pageData) {
262
- return <DynamicOfferSkeleton displayLayout={"fixed"} />;
260
+ return <DynamicOfferSkeleton />;
263
261
  }
264
262
 
265
263
  const {
266
264
  shouldHideFooter,
267
- displayLayout,
268
265
  showProductTypeLabel,
269
266
  showCardBorder,
270
267
  offers,
@@ -275,7 +272,6 @@ const InternalMoneyLionOfferCarousel = (
275
272
  const config: DynamicOfferProps = {
276
273
  offers,
277
274
  shouldHideFooter,
278
- displayLayout,
279
275
  showProductTypeLabel,
280
276
  showCardBorder,
281
277
  title,