@moneylion/react-native-offer-carousel 1.0.5 → 1.0.7

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 (244) hide show
  1. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js +45 -9
  2. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -1
  3. package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -1
  4. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js +2 -2
  5. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -1
  6. package/lib/commonjs/components/Button/index.js +4 -21
  7. package/lib/commonjs/components/Button/index.js.map +1 -1
  8. package/lib/commonjs/components/Cards/VideosCard/VideosCard.js +3 -3
  9. package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js +4 -4
  10. package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
  11. package/lib/commonjs/components/Common/BaseOfferCard/index.js +16 -15
  12. package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -1
  13. package/lib/commonjs/components/Common/DynamicOfferCard/CallToAction.js +2 -0
  14. package/lib/commonjs/components/Common/DynamicOfferCard/CallToAction.js.map +1 -1
  15. package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js +1 -1
  16. package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js.map +1 -1
  17. package/lib/commonjs/components/Common/DynamicOfferCard/index.js +3 -2
  18. package/lib/commonjs/components/Common/DynamicOfferCard/index.js.map +1 -1
  19. package/lib/commonjs/components/DynamicOffers/DynamicOffers.js +2 -2
  20. package/lib/commonjs/components/DynamicOffers/DynamicOffers.js.map +1 -1
  21. package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js +1 -1
  22. package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js.map +1 -1
  23. package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js +5 -5
  24. package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -1
  25. package/lib/commonjs/components/DynamicOffers/Render/FallbackOfferTemplate.js +2 -2
  26. package/lib/commonjs/components/DynamicOffers/Render/FallbackOfferTemplate.js.map +1 -1
  27. package/lib/commonjs/components/DynamicOffers/Render/Offer.js +5 -4
  28. package/lib/commonjs/components/DynamicOffers/Render/Offer.js.map +1 -1
  29. package/lib/commonjs/components/Layouts/CreditCardOfferCard/index.js +4 -3
  30. package/lib/commonjs/components/Layouts/CreditCardOfferCard/index.js.map +1 -1
  31. package/lib/commonjs/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
  32. package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js +2 -2
  33. package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js.map +1 -1
  34. package/lib/commonjs/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
  35. package/lib/commonjs/components/Layouts/HeadlineWithDescriptionCard/index.js +2 -2
  36. package/lib/commonjs/components/Layouts/HeadlineWithDescriptionCard/index.js.map +1 -1
  37. package/lib/commonjs/components/Modal/DescriptionPoints.js +2 -2
  38. package/lib/commonjs/components/Modal/DescriptionPoints.js.map +1 -1
  39. package/lib/commonjs/components/Modal/Disclaimer.js +2 -2
  40. package/lib/commonjs/components/Modal/Disclaimer.js.map +1 -1
  41. package/lib/commonjs/components/Modal/OfferDetailsModal.js +6 -2
  42. package/lib/commonjs/components/Modal/OfferDetailsModal.js.map +1 -1
  43. package/lib/commonjs/components/MoneyLionOfferCarousel.js +14 -16
  44. package/lib/commonjs/components/MoneyLionOfferCarousel.js.map +1 -1
  45. package/lib/commonjs/components/Text/index.js +18 -38
  46. package/lib/commonjs/components/Text/index.js.map +1 -1
  47. package/lib/commonjs/components/View/index.js +11 -94
  48. package/lib/commonjs/components/View/index.js.map +1 -1
  49. package/lib/commonjs/config/mocks/cnfContext.js +44 -8
  50. package/lib/commonjs/config/mocks/cnfContext.js.map +1 -1
  51. package/lib/commonjs/context/ThemeProvider.js +2 -2
  52. package/lib/commonjs/context/ThemeProvider.js.map +1 -1
  53. package/lib/commonjs/pageData.js +4 -3
  54. package/lib/commonjs/pageData.js.map +1 -1
  55. package/lib/commonjs/services/getDynamicOffers.js.map +1 -1
  56. package/lib/commonjs/services/getProductTypesByQuery.js +1 -1
  57. package/lib/commonjs/services/getProductTypesByQuery.js.map +1 -1
  58. package/lib/commonjs/utils/formatOfferUrl.js +1 -1
  59. package/lib/commonjs/utils/getOffersByProductTypes.js +2 -2
  60. package/lib/commonjs/utils/getOffersByProductTypes.js.map +1 -1
  61. package/lib/commonjs/utils/selectDynamicOffers.js.map +1 -1
  62. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js +45 -9
  63. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -1
  64. package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -1
  65. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js +2 -3
  66. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -1
  67. package/lib/module/components/Button/index.js +4 -21
  68. package/lib/module/components/Button/index.js.map +1 -1
  69. package/lib/module/components/Cards/VideosCard/VideosCard.js +3 -3
  70. package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js +4 -4
  71. package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
  72. package/lib/module/components/Common/BaseOfferCard/index.js +16 -15
  73. package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -1
  74. package/lib/module/components/Common/DynamicOfferCard/CallToAction.js +2 -0
  75. package/lib/module/components/Common/DynamicOfferCard/CallToAction.js.map +1 -1
  76. package/lib/module/components/Common/DynamicOfferCard/SeeMore.js +1 -1
  77. package/lib/module/components/Common/DynamicOfferCard/SeeMore.js.map +1 -1
  78. package/lib/module/components/Common/DynamicOfferCard/index.js +3 -2
  79. package/lib/module/components/Common/DynamicOfferCard/index.js.map +1 -1
  80. package/lib/module/components/DynamicOffers/DynamicOffers.js +2 -2
  81. package/lib/module/components/DynamicOffers/DynamicOffers.js.map +1 -1
  82. package/lib/module/components/DynamicOffers/DynamicOffersContainer.js +1 -1
  83. package/lib/module/components/DynamicOffers/DynamicOffersContainer.js.map +1 -1
  84. package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js +5 -5
  85. package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -1
  86. package/lib/module/components/DynamicOffers/Render/FallbackOfferTemplate.js +2 -2
  87. package/lib/module/components/DynamicOffers/Render/FallbackOfferTemplate.js.map +1 -1
  88. package/lib/module/components/DynamicOffers/Render/Offer.js +5 -4
  89. package/lib/module/components/DynamicOffers/Render/Offer.js.map +1 -1
  90. package/lib/module/components/Layouts/CreditCardOfferCard/index.js +4 -3
  91. package/lib/module/components/Layouts/CreditCardOfferCard/index.js.map +1 -1
  92. package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
  93. package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js.map +1 -1
  94. package/lib/module/components/Layouts/DefaultOfferCard/index.js +2 -2
  95. package/lib/module/components/Layouts/DefaultOfferCard/index.js.map +1 -1
  96. package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
  97. package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js.map +1 -1
  98. package/lib/module/components/Layouts/HeadlineWithDescriptionCard/index.js +2 -2
  99. package/lib/module/components/Layouts/HeadlineWithDescriptionCard/index.js.map +1 -1
  100. package/lib/module/components/Modal/DescriptionPoints.js +2 -2
  101. package/lib/module/components/Modal/DescriptionPoints.js.map +1 -1
  102. package/lib/module/components/Modal/Disclaimer.js +2 -2
  103. package/lib/module/components/Modal/Disclaimer.js.map +1 -1
  104. package/lib/module/components/Modal/OfferDetailsModal.js +6 -2
  105. package/lib/module/components/Modal/OfferDetailsModal.js.map +1 -1
  106. package/lib/module/components/MoneyLionOfferCarousel.js +14 -16
  107. package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
  108. package/lib/module/components/Text/index.js +17 -38
  109. package/lib/module/components/Text/index.js.map +1 -1
  110. package/lib/module/components/View/index.js +12 -95
  111. package/lib/module/components/View/index.js.map +1 -1
  112. package/lib/module/config/mocks/cnfContext.js +44 -8
  113. package/lib/module/config/mocks/cnfContext.js.map +1 -1
  114. package/lib/module/context/ThemeProvider.js +2 -2
  115. package/lib/module/context/ThemeProvider.js.map +1 -1
  116. package/lib/module/pageData.js +4 -3
  117. package/lib/module/pageData.js.map +1 -1
  118. package/lib/module/services/getDynamicOffers.js.map +1 -1
  119. package/lib/module/services/getProductTypesByQuery.js +1 -1
  120. package/lib/module/services/getProductTypesByQuery.js.map +1 -1
  121. package/lib/module/utils/formatOfferUrl.js +1 -1
  122. package/lib/module/utils/formatOfferUrl.js.map +1 -1
  123. package/lib/module/utils/getOffersByProductTypes.js +3 -2
  124. package/lib/module/utils/getOffersByProductTypes.js.map +1 -1
  125. package/lib/module/utils/selectDynamicOffers.js.map +1 -1
  126. package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts +90 -18
  127. package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +1 -1
  128. package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts +1 -1
  129. package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +1 -1
  130. package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/components.d.ts +3 -2
  131. package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +1 -1
  132. package/lib/typescript/src/components/Button/index.d.ts +3 -3
  133. package/lib/typescript/src/components/Button/index.d.ts.map +1 -1
  134. package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts +4 -4
  135. package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -1
  136. package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts +2 -2
  137. package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts.map +1 -1
  138. package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts +1 -1
  139. package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts.map +1 -1
  140. package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts +3 -3
  141. package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts.map +1 -1
  142. package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts +2 -2
  143. package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts.map +1 -1
  144. package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts +3 -3
  145. package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -1
  146. package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts +3 -3
  147. package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts.map +1 -1
  148. package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts +5 -4
  149. package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts.map +1 -1
  150. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts +3 -3
  151. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts.map +1 -1
  152. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts +2 -2
  153. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts.map +1 -1
  154. package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts +3 -3
  155. package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -1
  156. package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts +3 -3
  157. package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts.map +1 -1
  158. package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts +3 -3
  159. package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts.map +1 -1
  160. package/lib/typescript/src/components/Modal/Disclaimer.d.ts.map +1 -1
  161. package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts +1 -1
  162. package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -1
  163. package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts +2 -0
  164. package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts.map +1 -1
  165. package/lib/typescript/src/components/Text/index.d.ts +2 -2
  166. package/lib/typescript/src/components/Text/index.d.ts.map +1 -1
  167. package/lib/typescript/src/components/View/index.d.ts +4 -2
  168. package/lib/typescript/src/components/View/index.d.ts.map +1 -1
  169. package/lib/typescript/src/config/mocks/cnfContext.d.ts.map +1 -1
  170. package/lib/typescript/src/context/EventHandlerProvider.d.ts +1 -1
  171. package/lib/typescript/src/context/EventHandlerProvider.d.ts.map +1 -1
  172. package/lib/typescript/src/context/ThemeProvider.d.ts +47 -11
  173. package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -1
  174. package/lib/typescript/src/pageData.d.ts +2 -1
  175. package/lib/typescript/src/pageData.d.ts.map +1 -1
  176. package/lib/typescript/src/services/getDynamicOffers.d.ts +3 -3
  177. package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
  178. package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts +1 -1
  179. package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts.map +1 -1
  180. package/lib/typescript/src/utils/formatOfferUrl.d.ts +6 -1
  181. package/lib/typescript/src/utils/formatOfferUrl.d.ts.map +1 -1
  182. package/lib/typescript/src/utils/getDefaultProductType.d.ts +1 -1
  183. package/lib/typescript/src/utils/getDefaultProductType.d.ts.map +1 -1
  184. package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts +1 -1
  185. package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts.map +1 -1
  186. package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts +1 -1
  187. package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts.map +1 -1
  188. package/lib/typescript/src/utils/getOffersByProductTypes.d.ts +1 -1
  189. package/lib/typescript/src/utils/getOffersByProductTypes.d.ts.map +1 -1
  190. package/lib/typescript/src/utils/getProductTypesDefinition.d.ts +1 -1
  191. package/lib/typescript/src/utils/getProductTypesDefinition.d.ts.map +1 -1
  192. package/lib/typescript/src/utils/selectDynamicOffers.d.ts +1 -1
  193. package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +1 -1
  194. package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts +1 -1
  195. package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts.map +1 -1
  196. package/package.json +1 -1
  197. package/src/capabilities/core/src/system/cnfContext/schemas/Brand.ts +46 -10
  198. package/src/capabilities/offer-catalog/src/api/offerCatalogApi.ts +1 -1
  199. package/src/capabilities/ui/elements/src/components/MarkdownText/components.tsx +4 -4
  200. package/src/components/Button/index.tsx +7 -20
  201. package/src/components/Cards/VideosCard/VideosCard.tsx +3 -3
  202. package/src/components/Common/BaseOfferCard/Stat/Stat.tsx +4 -4
  203. package/src/components/Common/BaseOfferCard/index.tsx +36 -17
  204. package/src/components/Common/DynamicOfferCard/CallToAction.tsx +3 -1
  205. package/src/components/Common/DynamicOfferCard/SeeMore.tsx +2 -2
  206. package/src/components/Common/DynamicOfferCard/index.tsx +5 -4
  207. package/src/components/DynamicOffers/DynamicOffers.tsx +3 -3
  208. package/src/components/DynamicOffers/DynamicOffersContainer.tsx +1 -1
  209. package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +7 -7
  210. package/src/components/DynamicOffers/Render/FallbackOfferTemplate.tsx +4 -4
  211. package/src/components/DynamicOffers/Render/Offer.tsx +9 -6
  212. package/src/components/Layouts/CreditCardOfferCard/index.tsx +6 -6
  213. package/src/components/Layouts/CreditCardOfferCard/statsBuilder.tsx +2 -2
  214. package/src/components/Layouts/DefaultOfferCard/index.tsx +4 -5
  215. package/src/components/Layouts/DefaultOfferCard/statsBuilder.tsx +2 -2
  216. package/src/components/Layouts/HeadlineWithDescriptionCard/index.tsx +4 -4
  217. package/src/components/Modal/DescriptionPoints.tsx +2 -2
  218. package/src/components/Modal/Disclaimer.tsx +6 -2
  219. package/src/components/Modal/OfferDetailsModal.tsx +12 -7
  220. package/src/components/MoneyLionOfferCarousel.tsx +20 -14
  221. package/src/components/Text/index.tsx +10 -45
  222. package/src/components/View/index.tsx +14 -72
  223. package/src/config/mocks/cnfContext.ts +44 -8
  224. package/src/context/EventHandlerProvider.tsx +1 -1
  225. package/src/context/ThemeProvider.tsx +51 -14
  226. package/src/pageData.ts +5 -3
  227. package/src/services/getDynamicOffers.ts +5 -5
  228. package/src/services/getProductTypesByQuery.ts +1 -1
  229. package/src/utils/addClientTagsToOfferLinks.ts +1 -1
  230. package/src/utils/formatOfferUrl.ts +1 -1
  231. package/src/utils/getDefaultProductType.ts +1 -1
  232. package/src/utils/getEnableUseCachedOffers.ts +1 -1
  233. package/src/utils/getOffersBasedOnLayout.ts +1 -1
  234. package/src/utils/getOffersByProductTypes.ts +4 -3
  235. package/src/utils/getProductTypesDefinition.ts +1 -1
  236. package/src/utils/selectDynamicOffers.ts +1 -2
  237. package/src/utils/sortOffersByRecommendationScore.ts +1 -1
  238. package/lib/commonjs/utils/getDefaultPaletteColor.js +0 -20
  239. package/lib/commonjs/utils/getDefaultPaletteColor.js.map +0 -1
  240. package/lib/module/utils/getDefaultPaletteColor.js +0 -13
  241. package/lib/module/utils/getDefaultPaletteColor.js.map +0 -1
  242. package/lib/typescript/src/utils/getDefaultPaletteColor.d.ts +0 -3
  243. package/lib/typescript/src/utils/getDefaultPaletteColor.d.ts.map +0 -1
  244. package/src/utils/getDefaultPaletteColor.ts +0 -15
@@ -1,4 +1,4 @@
1
- import type { CnfContext } from "../src/capabilities/core/src/system/cnfContext/CnfContext";
1
+ import type { CnfContext } from "./capabilities/core/src/system/cnfContext/CnfContext";
2
2
  import type { MoneyLionOfferCarouselProps } from "./components/MoneyLionOfferCarousel";
3
3
  import type { onRateTableSubmitProps } from "./context/EventHandlerProvider";
4
4
  type GetPageDataProps = {
@@ -12,6 +12,7 @@ export declare function getPageData({ context, params, onRateTableSubmit, }: Get
12
12
  rateTableUuid: string;
13
13
  offers: import("./capabilities/offer-catalog/src").BaseOffer[];
14
14
  currentCountry: string | undefined;
15
+ showCardBorder: boolean | undefined;
15
16
  showProductTypeLabel: boolean | undefined;
16
17
  displayLayout: "fixed" | "carousel";
17
18
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"pageData.d.ts","sourceRoot":"","sources":["../../../src/pageData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2DAA2D,CAAC;AAE5F,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;;;;;;;;GAyElB"}
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;;;;;;;;;GA0ElB"}
@@ -1,7 +1,7 @@
1
- import type { CnfContext } from "../../src/capabilities/core/src/system/cnfContext/CnfContext";
2
- import type { PartnerOverride, ProductTypeDefinition } from "../../src/capabilities/offer-catalog/src";
3
1
  import { type Layout } from "../utils";
4
2
  import type { GetProductTypesProps, ProductTypesResult } from "./getProductTypes";
3
+ import type { PartnerOverride, ProductTypeDefinition } from "../capabilities/offer-catalog/src";
4
+ import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
5
5
  export type GetDynamicOffersProps = {
6
6
  tags: string;
7
7
  displayLayout: Layout;
@@ -19,7 +19,7 @@ export type GetDynamicOffersProps = {
19
19
  * @returns {Promise<{ productTypeDisplayName: string; offers: typeof offers }>} An object containing the product type display name and the offers.
20
20
  */
21
21
  export declare const getDynamicOffers: ({ tags, displayLayout, defaultProductType, productTypes, resultType, enableUseCachedOffers, productTypesDefinition, partnersOverrideDefinition, context, }: Omit<GetDynamicOffersProps, "isDev">) => Promise<{
22
- offers: import("../capabilities/offer-catalog/src/types/offerCatalogSchema").BaseOffer[];
22
+ offers: import("../capabilities/offer-catalog/src").BaseOffer[];
23
23
  isError: boolean | undefined;
24
24
  leadUuid: string;
25
25
  rateTableUuid: string;
@@ -1 +1 @@
1
- {"version":3,"file":"getDynamicOffers.d.ts","sourceRoot":"","sources":["../../../../src/services/getDynamicOffers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC/F,OAAO,KAAK,EACX,eAAe,EACf,qBAAqB,EACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAIN,KAAK,MAAM,EACX,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EACX,oBAAoB,EACpB,kBAAkB,EAClB,MAAM,mBAAmB,CAAC;AAM3B,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;;;;;EAoCtC,CAAC"}
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;;;;;EAoCtC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { BaseOffer } from "../../src/capabilities/offer-catalog/src";
1
+ import type { BaseOffer } from "../capabilities/offer-catalog/src";
2
2
  /**
3
3
  * Add client tags to offer links
4
4
  * @param enableUseCachedOffers - Whether to use cached offers
@@ -1 +1 @@
1
- {"version":3,"file":"addClientTagsToOfferLinks.d.ts","sourceRoot":"","sources":["../../../../src/utils/addClientTagsToOfferLinks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,0BACb,OAAO,cAAc,MAAM,cAC1C,SAAS,EAAE,KAAG,SAAS,EAW/B,CAAC"}
1
+ {"version":3,"file":"addClientTagsToOfferLinks.d.ts","sourceRoot":"","sources":["../../../../src/utils/addClientTagsToOfferLinks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,0BACb,OAAO,cAAc,MAAM,cAC1C,SAAS,EAAE,KAAG,SAAS,EAW/B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type BaseOffer, type PartnerOverride, type ProductTypeDefinition } from "../../src/capabilities/offer-catalog/src";
1
+ import { type BaseOffer, type PartnerOverride, type ProductTypeDefinition } from "../capabilities/offer-catalog/src";
2
2
  /**
3
3
  * Format the offer URL
4
4
  * @param offers - The offers to format if needed
@@ -11,6 +11,11 @@ export declare const formatOfferUrl: (productTypesDefinition: ProductTypeDefinit
11
11
  uuid: string;
12
12
  version: number;
13
13
  financialInstitutionUuid: string;
14
+ /**
15
+ * Format the offer URL
16
+ * @param offers - The offers to format if needed
17
+ * @returns The offers with the formatted URL
18
+ */
14
19
  createdAt: string;
15
20
  internalName: string;
16
21
  legalLanguage?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"formatOfferUrl.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatOfferUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,MAAM,0CAA0C,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,cAAc,2BAED,qBAAqB,EAAE,8BACnB,eAAe,EAAE,cAErC,SAAS,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAcnB,CAAC"}
1
+ {"version":3,"file":"formatOfferUrl.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatOfferUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,MAAM,mCAAmC,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,cAAc,2BAED,qBAAqB,EAAE,8BACnB,eAAe,EAAE,cAErC,SAAS,EAAE;;;;;;;IAVrB;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBD,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { CnfContext } from "../../src/capabilities/core/src/system/cnfContext/CnfContext";
1
+ import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
2
2
  export declare const getDefaultProductType: (context: CnfContext) => string;
3
3
  //# sourceMappingURL=getDefaultProductType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultProductType.d.ts","sourceRoot":"","sources":["../../../../src/utils/getDefaultProductType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAE/F,eAAO,MAAM,qBAAqB,YAAa,UAAU,WACE,CAAC"}
1
+ {"version":3,"file":"getDefaultProductType.d.ts","sourceRoot":"","sources":["../../../../src/utils/getDefaultProductType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAExF,eAAO,MAAM,qBAAqB,YAAa,UAAU,WACE,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { CnfContext } from "../../src/capabilities/core/src/system/cnfContext/CnfContext";
1
+ import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
2
2
  /**
3
3
  * Get enabled cache offers request
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"getEnableUseCachedOffers.d.ts","sourceRoot":"","sources":["../../../../src/utils/getEnableUseCachedOffers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAE/F;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,YAAa,UAAU,YACD,CAAC"}
1
+ {"version":3,"file":"getEnableUseCachedOffers.d.ts","sourceRoot":"","sources":["../../../../src/utils/getEnableUseCachedOffers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAExF;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,YAAa,UAAU,YACD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Layout } from "./layouts";
2
- import type { BaseOffer } from "../../src/capabilities/offer-catalog/src";
2
+ import type { BaseOffer } from "../capabilities/offer-catalog/src";
3
3
  /**
4
4
  * Sorts the offers based on the layout.
5
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"getOffersBasedOnLayout.d.ts","sourceRoot":"","sources":["../../../../src/utils/getOffersBasedOnLayout.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAI1E;;;;;GAKG;AACH,eAAO,MAAM,eAAe,WAAY,SAAS,EAAE,KAAG,SAAS,EAY9D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,WAAY,MAAM,cAAc,SAAS,EAAE,gBAIxE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,WACzB,MAAM,cAAc,SAAS,EAAE,gBAEvC,CAAC"}
1
+ {"version":3,"file":"getOffersBasedOnLayout.d.ts","sourceRoot":"","sources":["../../../../src/utils/getOffersBasedOnLayout.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAInE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,WAAY,SAAS,EAAE,KAAG,SAAS,EAY9D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,WAAY,MAAM,cAAc,SAAS,EAAE,gBAIxE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,WACzB,MAAM,cAAc,SAAS,EAAE,gBAEvC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { CnfContext } from "../../src/capabilities/core/src/system/cnfContext/CnfContext";
1
+ import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
2
2
  /**
3
3
  * Retrieves offers by product types.
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"getOffersByProductTypes.d.ts","sourceRoot":"","sources":["../../../../src/utils/getOffersByProductTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAM/F;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;2BAMZ,OAAO;kBAChB,MAAM,EAAE;UAChB,MAAM;aACH,UAAU;qEAWnB,CAAC"}
1
+ {"version":3,"file":"getOffersByProductTypes.d.ts","sourceRoot":"","sources":["../../../../src/utils/getOffersByProductTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAOxF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;2BAMZ,OAAO;kBAChB,MAAM,EAAE;UAChB,MAAM;aACH,UAAU;qEAWnB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { CnfContext } from "../../src/capabilities/core/src/system/cnfContext/CnfContext";
1
+ import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
2
2
  export declare const getProductTypesDefinition: (context: CnfContext) => {
3
3
  productTypesDefinition: readonly {
4
4
  readonly id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"getProductTypesDefinition.d.ts","sourceRoot":"","sources":["../../../../src/utils/getProductTypesDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAE/F,eAAO,MAAM,yBAAyB,YAAa,UAAU;;;;;;;;;;;CAU5D,CAAC"}
1
+ {"version":3,"file":"getProductTypesDefinition.d.ts","sourceRoot":"","sources":["../../../../src/utils/getProductTypesDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAExF,eAAO,MAAM,yBAAyB,YAAa,UAAU;;;;;;;;;;;CAU5D,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { BaseOffer } from "../../src/capabilities/offer-catalog/src";
1
+ import type { BaseOffer } from "../capabilities/offer-catalog/src";
2
2
  export declare const selectDynamicOffers: (offers: BaseOffer[], productTypes: string[]) => BaseOffer[];
3
3
  //# sourceMappingURL=selectDynamicOffers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectDynamicOffers.d.ts","sourceRoot":"","sources":["../../../../src/utils/selectDynamicOffers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAI1E,eAAO,MAAM,mBAAmB,WACvB,SAAS,EAAE,gBACL,MAAM,EAAE,gBAWtB,CAAC"}
1
+ {"version":3,"file":"selectDynamicOffers.d.ts","sourceRoot":"","sources":["../../../../src/utils/selectDynamicOffers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAGnE,eAAO,MAAM,mBAAmB,WACvB,SAAS,EAAE,gBACL,MAAM,EAAE,gBAWtB,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { BaseOffer } from "../../src/capabilities/offer-catalog/src";
1
+ import type { BaseOffer } from "../capabilities/offer-catalog/src";
2
2
  export declare const sortOffersByRecommendationScore: (offers: BaseOffer[]) => BaseOffer[];
3
3
  //# sourceMappingURL=sortOffersByRecommendationScore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sortOffersByRecommendationScore.d.ts","sourceRoot":"","sources":["../../../../src/utils/sortOffersByRecommendationScore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAE1E,eAAO,MAAM,+BAA+B,WAAY,SAAS,EAAE,gBAElE,CAAC"}
1
+ {"version":3,"file":"sortOffersByRecommendationScore.d.ts","sourceRoot":"","sources":["../../../../src/utils/sortOffersByRecommendationScore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE,eAAO,MAAM,+BAA+B,WAAY,SAAS,EAAE,gBAElE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneylion/react-native-offer-carousel",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
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,14 +1,50 @@
1
1
  import { Schema } from "effect";
2
2
 
3
- export type Palette = Schema.Schema.Type<typeof Palette>;
4
- const Palette = Schema.Struct({
5
- promotional: Schema.optional(Schema.String),
6
- generation: Schema.optional(Schema.Literal("generate", "provided")),
7
- colorScheme: Schema.optional(Schema.Literal("balanced", "light", "dark")),
8
- positive: Schema.optional(Schema.String),
9
- critical: Schema.optional(Schema.String),
10
- highlight: Schema.optional(Schema.String),
11
- neutral: Schema.optional(Schema.String),
3
+ export type ThemeColors = Schema.Schema.Type<typeof ThemeColors>;
4
+ const ThemeColors = Schema.Struct({
5
+ backgroundPrimary: Schema.String,
6
+ backgroundPrimaryFaded: Schema.String,
7
+ backgroundPrimaryHighlighted: Schema.String,
8
+ backgroundCritical: Schema.String,
9
+ backgroundCriticalFaded: Schema.String,
10
+ backgroundCriticalHighlighted: Schema.String,
11
+ backgroundWarning: Schema.String,
12
+ backgroundWarningFaded: Schema.String,
13
+ backgroundWarningHighlighted: Schema.String,
14
+ backgroundPositive: Schema.String,
15
+ backgroundPositiveFaded: Schema.String,
16
+ backgroundPositiveHighlighted: Schema.String,
17
+ backgroundNeutral: Schema.String,
18
+ backgroundNeutralFaded: Schema.String,
19
+ backgroundNeutralHighlighted: Schema.String,
20
+ backgroundDisabled: Schema.String,
21
+ backgroundDisabledFaded: Schema.String,
22
+ backgroundElevationBase: Schema.String,
23
+ backgroundElevationRaised: Schema.String,
24
+ backgroundElevationOverlay: Schema.String,
25
+ backgroundPage: Schema.String,
26
+ backgroundPageFaded: Schema.String,
27
+ borderPrimary: Schema.String,
28
+ borderPrimaryFaded: Schema.String,
29
+ borderCritical: Schema.String,
30
+ borderCriticalFaded: Schema.String,
31
+ borderWarning: Schema.String,
32
+ borderWarningFaded: Schema.String,
33
+ borderPositive: Schema.String,
34
+ borderPositiveFaded: Schema.String,
35
+ borderNeutral: Schema.String,
36
+ borderNeutralFaded: Schema.String,
37
+ borderDisabled: Schema.String,
38
+ foregroundPrimary: Schema.String,
39
+ foregroundCritical: Schema.String,
40
+ foregroundWarning: Schema.String,
41
+ foregroundPositive: Schema.String,
42
+ foregroundNeutral: Schema.String,
43
+ foregroundNeutralFaded: Schema.String,
44
+ foregroundDisabled: Schema.String,
45
+ brand: Schema.String,
46
+ white: Schema.String,
47
+ black: Schema.String,
12
48
  });
13
49
 
14
50
  export type Links = Schema.Schema.Type<typeof Links>;
@@ -84,7 +120,7 @@ const BrandFields = Schema.Struct({
84
120
  displayName: Schema.String,
85
121
  isLicensed: Schema.optional(Schema.Boolean),
86
122
  hideLicensedLogo: Schema.optional(Schema.Boolean),
87
- palette: Schema.optional(Palette),
123
+ themeColors: ThemeColors,
88
124
  links: Schema.optional(Links),
89
125
  logos: Schema.optional(Logos),
90
126
  font: Schema.optional(Font),
@@ -1,5 +1,4 @@
1
1
  import { isEmpty } from "radash";
2
- import type { CnfContext } from "../../../core/src/system/cnfContext/CnfContext";
3
2
  import type { OffersData } from "../types/offerCatalogSchema";
4
3
  import {
5
4
  getIsDevEnvironment,
@@ -12,6 +11,7 @@ import errorUtil from "../utils/errorUtil";
12
11
  import type { State } from "../../../offers/pipeline/src/sources/ratetables/types";
13
12
  import { withDeviceSignals } from "../../../offers/pipeline/src/sources/ratetables/withDeviceSignals";
14
13
  import { getOfferCatalogApiBaseUrl } from "../../../../apiEnvironment";
14
+ import type { CnfContext } from "../../../core/src/system/cnfContext/CnfContext";
15
15
 
16
16
  export const getCachedOffersByProductTypes =
17
17
  (context: CnfContext) => async (productTypes: string[]) => {
@@ -8,10 +8,10 @@ import {
8
8
  type RenderRules,
9
9
  } from "react-native-markdown-display";
10
10
  import Text, {
11
- type TextColor,
12
11
  type TextWeight,
13
12
  type Variant,
14
13
  } from "../../../../../../components/Text";
14
+ import type { ThemeColors } from "../../../../../core/src";
15
15
 
16
16
  // Helper to create text variants
17
17
  const createTextVariant =
@@ -28,7 +28,7 @@ export const createMarkdownComponents = ({
28
28
  numberOfLines?: number;
29
29
  variant?: Variant;
30
30
  weight?: TextWeight;
31
- color?: TextColor;
31
+ color?: keyof ThemeColors;
32
32
  }): RenderRules => {
33
33
  // Keep track of the first list item
34
34
  let isFirstListItem = true;
@@ -78,7 +78,7 @@ export const createMarkdownComponents = ({
78
78
  key={node.key || `${node.type}-${node.index}`}
79
79
  variant={variant}
80
80
  weight={weight}
81
- color={"primary"}
81
+ color={color}
82
82
  style={styles.linkText}
83
83
  onPress={() => openUrl(node.attributes.href || "")}
84
84
  >
@@ -115,7 +115,7 @@ export const createMarkdownComponents = ({
115
115
  key={node.key || `${node.type}-${node.index}`}
116
116
  variant={variant || "body-3"}
117
117
  weight={weight}
118
- color={color || "neutral-faded"}
118
+ color={color}
119
119
  >
120
120
  <Text variant={"body-1"}>{prefix}• </Text>
121
121
  {children}
@@ -8,7 +8,7 @@ import {
8
8
  type ViewStyle,
9
9
  type TouchableOpacityProps,
10
10
  } from "react-native";
11
- import { useTheme, type ThemePalette } from "../../context/ThemeProvider";
11
+ import { useTheme, type ThemeColors } from "../../context/ThemeProvider";
12
12
  import Text from "../Text";
13
13
 
14
14
  // Helper function to determine text color based on background color
@@ -29,10 +29,10 @@ const getContrastColor = (hexColor: string): string => {
29
29
  return luminance > 0.5 ? "#000000" : "#FFFFFF";
30
30
  };
31
31
 
32
- export type Colors = keyof Omit<ThemePalette, "generation" | "colorScheme">;
32
+ type Colors = keyof ThemeColors;
33
33
 
34
34
  export interface ButtonProps extends TouchableOpacityProps {
35
- color?: Colors;
35
+ color: Colors;
36
36
  loading?: boolean;
37
37
  highlighted?: boolean;
38
38
  disabled?: boolean;
@@ -42,7 +42,7 @@ export interface ButtonProps extends TouchableOpacityProps {
42
42
 
43
43
  const Button = forwardRef<TouchableOpacity, ButtonProps>((props, ref) => {
44
44
  const {
45
- color = "neutral",
45
+ color,
46
46
  highlighted = false,
47
47
  loading = false,
48
48
  disabled = false,
@@ -57,24 +57,11 @@ const Button = forwardRef<TouchableOpacity, ButtonProps>((props, ref) => {
57
57
  const theme = themeContext?.theme || {};
58
58
 
59
59
  // Convert palette colors to actual styles
60
- const getPaletteColor = (colorKey: Colors) => {
61
- switch (colorKey) {
62
- case "promotional":
63
- return theme.promotional || "#007AFF"; // TODO: remove fallback color
64
- case "positive":
65
- return theme.positive;
66
- case "critical":
67
- return theme.critical || "#FF3B30"; // TODO: remove fallback color
68
- case "highlight":
69
- return theme.highlight || "#FF9500"; // TODO: remove fallback color
70
- case "neutral":
71
- return theme.neutral || "#8E8E93"; // TODO: remove fallback color
72
- default:
73
- return "#8E8E93";
74
- }
60
+ const getThemeColor = (colorKey: Colors) => {
61
+ return theme[colorKey];
75
62
  };
76
63
 
77
- const backgroundColor = getPaletteColor(color);
64
+ const backgroundColor = getThemeColor(color);
78
65
  const textColor = getContrastColor(backgroundColor);
79
66
 
80
67
  return (
@@ -13,19 +13,19 @@
13
13
 
14
14
  // export type VideosCardProps = {
15
15
  // videosContent: VideosContent;
16
- // showBorder: boolean;
16
+ // showCardBorder: boolean;
17
17
  // };
18
18
 
19
19
  // export const VideosCard = memo(
20
20
  // ({
21
21
  // videosContent: { title, subtitle, videos },
22
- // showBorder,
22
+ // showCardBorder,
23
23
  // }: VideosCardProps) => {
24
24
  // const renderVideos = () =>
25
25
  // videos.map((video) => <VideoContent key={video.muxId} {...video} />);
26
26
 
27
27
  // return (
28
- // <GenericOfferVertical showBorder={showBorder}>
28
+ // <GenericOfferVertical showCardBorder={showCardBorder}>
29
29
  // <GenericOfferVertical.Container>
30
30
  // <View style={styles.textContainer}>
31
31
  // <Text variant="featured-2" weight="bold">
@@ -24,13 +24,13 @@ function smartCapitalize(text: string): string {
24
24
  const VerticalStat = (props: StatProps) => {
25
25
  return (
26
26
  <View style={styles.verticalStatContainer}>
27
- <Text variant="featured-2" color="neutral" weight={"bold"}>
27
+ <Text variant="featured-2" color={"foregroundNeutral"} weight={"bold"}>
28
28
  {String(props.content).trim()}
29
29
  </Text>
30
30
  <MarkdownText
31
31
  variant={"body-3"}
32
32
  weight={"normal"}
33
- color={"neutral-faded"}
33
+ color={"foregroundNeutralFaded"}
34
34
  content={props.label.trim()}
35
35
  />
36
36
  </View>
@@ -67,10 +67,10 @@ export const Stat = ({
67
67
  >
68
68
  <MarkdownText
69
69
  variant={"body-3"}
70
- color={"neutral-faded"}
70
+ color={"foregroundNeutralFaded"}
71
71
  content={label.trim()}
72
72
  />
73
- <Text variant="body-3" color="neutral" weight="bold">
73
+ <Text variant="body-3" color="foregroundNeutral" weight="bold">
74
74
  {smartCapitalize(String(content).trim())}
75
75
  </Text>
76
76
  </View>
@@ -1,8 +1,5 @@
1
1
  import React, { type ComponentProps } from "react";
2
2
 
3
- import { ThumborImage } from "../../../../src/capabilities/ui/elements/src";
4
- import { MarkdownText } from "../../../../src/capabilities/ui/elements/src/components/MarkdownText";
5
- import { arrayToMarkdownList } from "../../../../src/capabilities/offer-catalog/src";
6
3
  import { StatsContainer } from "./StatsContainer";
7
4
  import { Content } from "./Content";
8
5
  import { Stat } from "./Stat";
@@ -11,18 +8,21 @@ import Divider from "../../Divider";
11
8
  import Text, { type TextProps } from "../../Text";
12
9
  import View, { type ViewProps } from "../../View";
13
10
  import { StyleSheet } from "react-native";
11
+ import { ThumborImage } from "../../../capabilities/ui/elements/src";
12
+ import { arrayToMarkdownList } from "../../../capabilities/offer-catalog/src";
13
+ import { MarkdownText } from "../../../capabilities/ui/elements/src/components/MarkdownText";
14
14
 
15
15
  const CardWidth = 282;
16
16
 
17
17
  const BaseOfferCard = ({
18
18
  children,
19
- showBorder = true,
19
+ showCardBorder = true,
20
20
  ...rest
21
- }: ViewProps & { showBorder: boolean }) => (
21
+ }: ViewProps & { showCardBorder?: boolean }) => (
22
22
  <View
23
- borderColor={showBorder ? "neutral" : undefined}
23
+ borderColor={showCardBorder ? "borderNeutral" : undefined}
24
24
  direction={"column"}
25
- backgroundColor={"white"}
25
+ backgroundColor={"backgroundElevationBase"}
26
26
  width={CardWidth}
27
27
  gap={1}
28
28
  style={styles.baseOfferCard}
@@ -45,7 +45,12 @@ const Container = ({ children, ...rest }: ViewProps) => (
45
45
  );
46
46
 
47
47
  const Tip = ({ children }: ViewProps) => (
48
- <Text variant="caption-2" color="positive" weight="bold" style={styles.tip}>
48
+ <Text
49
+ variant="caption-2"
50
+ color="foregroundPositive"
51
+ weight="bold"
52
+ style={styles.tip}
53
+ >
49
54
  {children}
50
55
  </Text>
51
56
  );
@@ -118,7 +123,7 @@ const TopContainer = ({ children, ...viewProps }: ViewProps) => (
118
123
  const TopBar = ({ children, ...viewProps }: ViewProps) => (
119
124
  <View
120
125
  direction={"row"}
121
- backgroundColor="primary-faded"
126
+ backgroundColor="backgroundPrimaryFaded"
122
127
  {...viewProps}
123
128
  style={styles.topBar}
124
129
  >
@@ -127,7 +132,12 @@ const TopBar = ({ children, ...viewProps }: ViewProps) => (
127
132
  );
128
133
 
129
134
  const ProductType = ({ children, ...rest }: TextProps) => (
130
- <Text weight={"bold"} variant={"caption-1"} color="primary" {...rest}>
135
+ <Text
136
+ weight={"bold"}
137
+ variant={"caption-1"}
138
+ color="foregroundPrimary"
139
+ {...rest}
140
+ >
131
141
  {children}
132
142
  </Text>
133
143
  );
@@ -153,7 +163,7 @@ const BottomBar = ({ children, ...viewProps }: ViewProps) => (
153
163
  const Headline = ({ children, ...rest }: TextProps) => (
154
164
  <Text
155
165
  variant="body-2"
156
- color="neutral"
166
+ color="foregroundNeutral"
157
167
  weight="bold"
158
168
  numberOfLines={2}
159
169
  {...rest}
@@ -163,7 +173,12 @@ const Headline = ({ children, ...rest }: TextProps) => (
163
173
  );
164
174
 
165
175
  const Description = ({ children, ...rest }: TextProps) => (
166
- <Text variant="body-3" color="neutral-faded" numberOfLines={4} {...rest}>
176
+ <Text
177
+ variant="body-3"
178
+ color="foregroundNeutralFaded"
179
+ numberOfLines={4}
180
+ {...rest}
181
+ >
167
182
  {children}
168
183
  </Text>
169
184
  );
@@ -175,7 +190,7 @@ const DescriptionPoints = ({
175
190
  descriptionPoints.length > 0 && (
176
191
  <MarkdownText
177
192
  content={arrayToMarkdownList(descriptionPoints)}
178
- color="neutral-faded"
193
+ color="foregroundNeutralFaded"
179
194
  variant="body-3"
180
195
  {...rest}
181
196
  />
@@ -195,7 +210,7 @@ const DescriptionHandler = ({
195
210
  return (
196
211
  <DescriptionPoints
197
212
  numberOfLines={4}
198
- color={"neutral-faded"}
213
+ color="foregroundNeutralFaded"
199
214
  variant={"body-3"}
200
215
  descriptionPoints={descriptionPoints}
201
216
  />
@@ -204,7 +219,7 @@ const DescriptionHandler = ({
204
219
 
205
220
  if (contentDescription) {
206
221
  return (
207
- <Description variant={"body-3"} color={"neutral-faded"}>
222
+ <Description variant={"body-3"} color="foregroundNeutralFaded">
208
223
  {contentDescription}
209
224
  </Description>
210
225
  );
@@ -221,8 +236,12 @@ const DescriptionHandler = ({
221
236
  );
222
237
  };
223
238
 
224
- const CallToAction = ({ children, ...rest }: ComponentProps<typeof Button>) => (
225
- <Button color="positive" {...rest}>
239
+ const CallToAction = ({
240
+ color,
241
+ children,
242
+ ...rest
243
+ }: ComponentProps<typeof Button>) => (
244
+ <Button color={color} {...rest}>
226
245
  {children}
227
246
  </Button>
228
247
  );
@@ -1,9 +1,9 @@
1
1
  import React, { type ComponentProps } from "react";
2
2
  import { BaseOfferCard } from "../BaseOfferCard";
3
- import type { BaseOffer } from "../../../../src/capabilities/offer-catalog/src";
4
3
  import type Button from "../../Button";
5
4
  import { Linking } from "react-native";
6
5
  import { useEventHandler } from "../../../context/EventHandlerProvider";
6
+ import type { BaseOffer } from "../../../capabilities/offer-catalog/src";
7
7
 
8
8
  export type CTAProps = ComponentProps<typeof Button & { href: string }> & {
9
9
  overrideUrl?: string;
@@ -14,6 +14,7 @@ export type CTAProps = ComponentProps<typeof Button & { href: string }> & {
14
14
  };
15
15
 
16
16
  export const CallToAction = ({
17
+ color,
17
18
  children,
18
19
  offer,
19
20
  context,
@@ -23,6 +24,7 @@ export const CallToAction = ({
23
24
  const { onOfferClick, rateTableUuid, leadUuid } = useEventHandler();
24
25
  return (
25
26
  <BaseOfferCard.CallToAction
27
+ color={color}
26
28
  onPress={() => {
27
29
  onOfferClick?.({
28
30
  timestamp: new Date().toISOString(),
@@ -1,9 +1,9 @@
1
1
  import React, { useCallback, useState } from "react";
2
- import type { BaseOffer } from "../../../../src/capabilities/offer-catalog/src";
3
2
  import Text from "../../Text";
4
3
  import { TouchableOpacity, StyleSheet } from "react-native";
5
4
  import { OfferDetailsModal } from "../../Modal/OfferDetailsModal";
6
5
  import { useEventHandler } from "../../../context/EventHandlerProvider";
6
+ import type { BaseOffer } from "../../../capabilities/offer-catalog/src";
7
7
 
8
8
  export type SeeMoreProps = {
9
9
  offer: BaseOffer;
@@ -48,7 +48,7 @@ export const SeeMore = ({ offer, offerIndex }: SeeMoreProps) => {
48
48
  <TouchableOpacity onPress={handleMoreInfoClick} style={styles.container}>
49
49
  <Text
50
50
  variant={"body-3"}
51
- color={"neutral"}
51
+ color={"foregroundNeutral"}
52
52
  weight={"medium"}
53
53
  style={styles.text}
54
54
  >
@@ -1,14 +1,14 @@
1
- import type { BaseOffer } from "../../../../src/capabilities/offer-catalog/src";
2
1
  import React from "react";
3
2
  import { BaseOfferCard } from "../BaseOfferCard";
4
3
  import { CallToAction } from "./CallToAction";
5
4
  import { StyleSheet } from "react-native";
5
+ import type { BaseOffer } from "../../../capabilities/offer-catalog/src";
6
6
 
7
7
  type DefaultOfferCatalogOfferType = {
8
8
  children: React.ReactNode;
9
9
  offer: BaseOffer;
10
10
  offerIndex: number;
11
- showBorder: boolean;
11
+ showCardBorder: boolean;
12
12
  showProductTypeLabel?: boolean;
13
13
  };
14
14
 
@@ -16,11 +16,11 @@ function DynamicOfferCard({
16
16
  children,
17
17
  offer,
18
18
  offerIndex,
19
- showBorder,
19
+ showCardBorder,
20
20
  showProductTypeLabel,
21
21
  }: DefaultOfferCatalogOfferType) {
22
22
  return (
23
- <BaseOfferCard showBorder={showBorder}>
23
+ <BaseOfferCard showCardBorder={showCardBorder}>
24
24
  {showProductTypeLabel && (
25
25
  <BaseOfferCard.TopBar>
26
26
  <BaseOfferCard.ProductType>
@@ -39,6 +39,7 @@ function DynamicOfferCard({
39
39
 
40
40
  <BaseOfferCard.BottomBar>
41
41
  <CallToAction
42
+ color={"backgroundPositive"}
42
43
  offer={offer}
43
44
  overrideUrl={offer.overrideUrl}
44
45
  style={styles.cta}