@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.
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js +45 -9
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -1
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js +2 -2
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +4 -21
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Cards/VideosCard/VideosCard.js +3 -3
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js +4 -4
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/index.js +16 -15
- package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/commonjs/components/Common/DynamicOfferCard/CallToAction.js +2 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/CallToAction.js.map +1 -1
- package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js +1 -1
- package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js.map +1 -1
- package/lib/commonjs/components/Common/DynamicOfferCard/index.js +3 -2
- package/lib/commonjs/components/Common/DynamicOfferCard/index.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/DynamicOffers.js +2 -2
- package/lib/commonjs/components/DynamicOffers/DynamicOffers.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js +1 -1
- package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js +5 -5
- package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/Render/FallbackOfferTemplate.js +2 -2
- package/lib/commonjs/components/DynamicOffers/Render/FallbackOfferTemplate.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/Render/Offer.js +5 -4
- package/lib/commonjs/components/DynamicOffers/Render/Offer.js.map +1 -1
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/index.js +4 -3
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/index.js.map +1 -1
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
- package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js +2 -2
- package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js.map +1 -1
- package/lib/commonjs/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
- package/lib/commonjs/components/Layouts/HeadlineWithDescriptionCard/index.js +2 -2
- package/lib/commonjs/components/Layouts/HeadlineWithDescriptionCard/index.js.map +1 -1
- package/lib/commonjs/components/Modal/DescriptionPoints.js +2 -2
- package/lib/commonjs/components/Modal/DescriptionPoints.js.map +1 -1
- package/lib/commonjs/components/Modal/Disclaimer.js +2 -2
- package/lib/commonjs/components/Modal/Disclaimer.js.map +1 -1
- package/lib/commonjs/components/Modal/OfferDetailsModal.js +6 -2
- package/lib/commonjs/components/Modal/OfferDetailsModal.js.map +1 -1
- package/lib/commonjs/components/MoneyLionOfferCarousel.js +14 -16
- package/lib/commonjs/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/commonjs/components/Text/index.js +18 -38
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/View/index.js +11 -94
- package/lib/commonjs/components/View/index.js.map +1 -1
- package/lib/commonjs/config/mocks/cnfContext.js +44 -8
- package/lib/commonjs/config/mocks/cnfContext.js.map +1 -1
- package/lib/commonjs/context/ThemeProvider.js +2 -2
- package/lib/commonjs/context/ThemeProvider.js.map +1 -1
- package/lib/commonjs/pageData.js +4 -3
- package/lib/commonjs/pageData.js.map +1 -1
- package/lib/commonjs/services/getDynamicOffers.js.map +1 -1
- package/lib/commonjs/services/getProductTypesByQuery.js +1 -1
- package/lib/commonjs/services/getProductTypesByQuery.js.map +1 -1
- package/lib/commonjs/utils/formatOfferUrl.js +1 -1
- package/lib/commonjs/utils/getOffersByProductTypes.js +2 -2
- package/lib/commonjs/utils/getOffersByProductTypes.js.map +1 -1
- package/lib/commonjs/utils/selectDynamicOffers.js.map +1 -1
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js +45 -9
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -1
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js +2 -3
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -1
- package/lib/module/components/Button/index.js +4 -21
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Cards/VideosCard/VideosCard.js +3 -3
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js +4 -4
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
- package/lib/module/components/Common/BaseOfferCard/index.js +16 -15
- package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/module/components/Common/DynamicOfferCard/CallToAction.js +2 -0
- package/lib/module/components/Common/DynamicOfferCard/CallToAction.js.map +1 -1
- package/lib/module/components/Common/DynamicOfferCard/SeeMore.js +1 -1
- package/lib/module/components/Common/DynamicOfferCard/SeeMore.js.map +1 -1
- package/lib/module/components/Common/DynamicOfferCard/index.js +3 -2
- package/lib/module/components/Common/DynamicOfferCard/index.js.map +1 -1
- package/lib/module/components/DynamicOffers/DynamicOffers.js +2 -2
- package/lib/module/components/DynamicOffers/DynamicOffers.js.map +1 -1
- package/lib/module/components/DynamicOffers/DynamicOffersContainer.js +1 -1
- package/lib/module/components/DynamicOffers/DynamicOffersContainer.js.map +1 -1
- package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js +5 -5
- package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -1
- package/lib/module/components/DynamicOffers/Render/FallbackOfferTemplate.js +2 -2
- package/lib/module/components/DynamicOffers/Render/FallbackOfferTemplate.js.map +1 -1
- package/lib/module/components/DynamicOffers/Render/Offer.js +5 -4
- package/lib/module/components/DynamicOffers/Render/Offer.js.map +1 -1
- package/lib/module/components/Layouts/CreditCardOfferCard/index.js +4 -3
- package/lib/module/components/Layouts/CreditCardOfferCard/index.js.map +1 -1
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js.map +1 -1
- package/lib/module/components/Layouts/DefaultOfferCard/index.js +2 -2
- package/lib/module/components/Layouts/DefaultOfferCard/index.js.map +1 -1
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js.map +1 -1
- package/lib/module/components/Layouts/HeadlineWithDescriptionCard/index.js +2 -2
- package/lib/module/components/Layouts/HeadlineWithDescriptionCard/index.js.map +1 -1
- package/lib/module/components/Modal/DescriptionPoints.js +2 -2
- package/lib/module/components/Modal/DescriptionPoints.js.map +1 -1
- package/lib/module/components/Modal/Disclaimer.js +2 -2
- package/lib/module/components/Modal/Disclaimer.js.map +1 -1
- package/lib/module/components/Modal/OfferDetailsModal.js +6 -2
- package/lib/module/components/Modal/OfferDetailsModal.js.map +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js +14 -16
- package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/module/components/Text/index.js +17 -38
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/View/index.js +12 -95
- package/lib/module/components/View/index.js.map +1 -1
- package/lib/module/config/mocks/cnfContext.js +44 -8
- package/lib/module/config/mocks/cnfContext.js.map +1 -1
- package/lib/module/context/ThemeProvider.js +2 -2
- package/lib/module/context/ThemeProvider.js.map +1 -1
- package/lib/module/pageData.js +4 -3
- package/lib/module/pageData.js.map +1 -1
- package/lib/module/services/getDynamicOffers.js.map +1 -1
- package/lib/module/services/getProductTypesByQuery.js +1 -1
- package/lib/module/services/getProductTypesByQuery.js.map +1 -1
- package/lib/module/utils/formatOfferUrl.js +1 -1
- package/lib/module/utils/formatOfferUrl.js.map +1 -1
- package/lib/module/utils/getOffersByProductTypes.js +3 -2
- package/lib/module/utils/getOffersByProductTypes.js.map +1 -1
- package/lib/module/utils/selectDynamicOffers.js.map +1 -1
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts +90 -18
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/components.d.ts +3 -2
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/index.d.ts +3 -3
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts +4 -4
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts +2 -2
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts +3 -3
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts +2 -2
- package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts +3 -3
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts +3 -3
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts +5 -4
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts +3 -3
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts +2 -2
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts +3 -3
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts +3 -3
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts +3 -3
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Modal/Disclaimer.d.ts.map +1 -1
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts +1 -1
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -1
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts +2 -0
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts.map +1 -1
- package/lib/typescript/src/components/Text/index.d.ts +2 -2
- package/lib/typescript/src/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/src/components/View/index.d.ts +4 -2
- package/lib/typescript/src/components/View/index.d.ts.map +1 -1
- package/lib/typescript/src/config/mocks/cnfContext.d.ts.map +1 -1
- package/lib/typescript/src/context/EventHandlerProvider.d.ts +1 -1
- package/lib/typescript/src/context/EventHandlerProvider.d.ts.map +1 -1
- package/lib/typescript/src/context/ThemeProvider.d.ts +47 -11
- package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/pageData.d.ts +2 -1
- package/lib/typescript/src/pageData.d.ts.map +1 -1
- package/lib/typescript/src/services/getDynamicOffers.d.ts +3 -3
- package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts +1 -1
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts.map +1 -1
- package/lib/typescript/src/utils/formatOfferUrl.d.ts +6 -1
- package/lib/typescript/src/utils/formatOfferUrl.d.ts.map +1 -1
- package/lib/typescript/src/utils/getDefaultProductType.d.ts +1 -1
- package/lib/typescript/src/utils/getDefaultProductType.d.ts.map +1 -1
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts +1 -1
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts +1 -1
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts.map +1 -1
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts +1 -1
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts +1 -1
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts.map +1 -1
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts +1 -1
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts +1 -1
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/capabilities/core/src/system/cnfContext/schemas/Brand.ts +46 -10
- package/src/capabilities/offer-catalog/src/api/offerCatalogApi.ts +1 -1
- package/src/capabilities/ui/elements/src/components/MarkdownText/components.tsx +4 -4
- package/src/components/Button/index.tsx +7 -20
- package/src/components/Cards/VideosCard/VideosCard.tsx +3 -3
- package/src/components/Common/BaseOfferCard/Stat/Stat.tsx +4 -4
- package/src/components/Common/BaseOfferCard/index.tsx +36 -17
- package/src/components/Common/DynamicOfferCard/CallToAction.tsx +3 -1
- package/src/components/Common/DynamicOfferCard/SeeMore.tsx +2 -2
- package/src/components/Common/DynamicOfferCard/index.tsx +5 -4
- package/src/components/DynamicOffers/DynamicOffers.tsx +3 -3
- package/src/components/DynamicOffers/DynamicOffersContainer.tsx +1 -1
- package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +7 -7
- package/src/components/DynamicOffers/Render/FallbackOfferTemplate.tsx +4 -4
- package/src/components/DynamicOffers/Render/Offer.tsx +9 -6
- package/src/components/Layouts/CreditCardOfferCard/index.tsx +6 -6
- package/src/components/Layouts/CreditCardOfferCard/statsBuilder.tsx +2 -2
- package/src/components/Layouts/DefaultOfferCard/index.tsx +4 -5
- package/src/components/Layouts/DefaultOfferCard/statsBuilder.tsx +2 -2
- package/src/components/Layouts/HeadlineWithDescriptionCard/index.tsx +4 -4
- package/src/components/Modal/DescriptionPoints.tsx +2 -2
- package/src/components/Modal/Disclaimer.tsx +6 -2
- package/src/components/Modal/OfferDetailsModal.tsx +12 -7
- package/src/components/MoneyLionOfferCarousel.tsx +20 -14
- package/src/components/Text/index.tsx +10 -45
- package/src/components/View/index.tsx +14 -72
- package/src/config/mocks/cnfContext.ts +44 -8
- package/src/context/EventHandlerProvider.tsx +1 -1
- package/src/context/ThemeProvider.tsx +51 -14
- package/src/pageData.ts +5 -3
- package/src/services/getDynamicOffers.ts +5 -5
- package/src/services/getProductTypesByQuery.ts +1 -1
- package/src/utils/addClientTagsToOfferLinks.ts +1 -1
- package/src/utils/formatOfferUrl.ts +1 -1
- package/src/utils/getDefaultProductType.ts +1 -1
- package/src/utils/getEnableUseCachedOffers.ts +1 -1
- package/src/utils/getOffersBasedOnLayout.ts +1 -1
- package/src/utils/getOffersByProductTypes.ts +4 -3
- package/src/utils/getProductTypesDefinition.ts +1 -1
- package/src/utils/selectDynamicOffers.ts +1 -2
- package/src/utils/sortOffersByRecommendationScore.ts +1 -1
- package/lib/commonjs/utils/getDefaultPaletteColor.js +0 -20
- package/lib/commonjs/utils/getDefaultPaletteColor.js.map +0 -1
- package/lib/module/utils/getDefaultPaletteColor.js +0 -13
- package/lib/module/utils/getDefaultPaletteColor.js.map +0 -1
- package/lib/typescript/src/utils/getDefaultPaletteColor.d.ts +0 -3
- package/lib/typescript/src/utils/getDefaultPaletteColor.d.ts.map +0 -1
- package/src/utils/getDefaultPaletteColor.ts +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CnfContext } from "
|
|
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,
|
|
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
|
|
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,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addClientTagsToOfferLinks.d.ts","sourceRoot":"","sources":["../../../../src/utils/addClientTagsToOfferLinks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
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 "
|
|
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,
|
|
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 "
|
|
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,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEnableUseCachedOffers.d.ts","sourceRoot":"","sources":["../../../../src/utils/getEnableUseCachedOffers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
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 +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,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOffersByProductTypes.d.ts","sourceRoot":"","sources":["../../../../src/utils/getOffersByProductTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
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 "
|
|
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,
|
|
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 "
|
|
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,
|
|
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 "
|
|
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,
|
|
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,14 +1,50 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
|
-
export type
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
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?:
|
|
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={
|
|
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
|
|
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
|
|
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
|
-
|
|
32
|
+
type Colors = keyof ThemeColors;
|
|
33
33
|
|
|
34
34
|
export interface ButtonProps extends TouchableOpacityProps {
|
|
35
|
-
color
|
|
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
|
|
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
|
|
61
|
-
|
|
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 =
|
|
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
|
-
//
|
|
16
|
+
// showCardBorder: boolean;
|
|
17
17
|
// };
|
|
18
18
|
|
|
19
19
|
// export const VideosCard = memo(
|
|
20
20
|
// ({
|
|
21
21
|
// videosContent: { title, subtitle, videos },
|
|
22
|
-
//
|
|
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
|
|
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="
|
|
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={"
|
|
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={"
|
|
70
|
+
color={"foregroundNeutralFaded"}
|
|
71
71
|
content={label.trim()}
|
|
72
72
|
/>
|
|
73
|
-
<Text variant="body-3" color="
|
|
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
|
-
|
|
19
|
+
showCardBorder = true,
|
|
20
20
|
...rest
|
|
21
|
-
}: ViewProps & {
|
|
21
|
+
}: ViewProps & { showCardBorder?: boolean }) => (
|
|
22
22
|
<View
|
|
23
|
-
borderColor={
|
|
23
|
+
borderColor={showCardBorder ? "borderNeutral" : undefined}
|
|
24
24
|
direction={"column"}
|
|
25
|
-
backgroundColor={"
|
|
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
|
|
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="
|
|
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
|
|
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="
|
|
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
|
|
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="
|
|
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=
|
|
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=
|
|
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 = ({
|
|
225
|
-
|
|
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={"
|
|
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
|
-
|
|
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
|
-
|
|
19
|
+
showCardBorder,
|
|
20
20
|
showProductTypeLabel,
|
|
21
21
|
}: DefaultOfferCatalogOfferType) {
|
|
22
22
|
return (
|
|
23
|
-
<BaseOfferCard
|
|
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}
|