@moneylion/react-native-offer-carousel 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/lib/commonjs/apiEnvironment.js +24 -0
- package/lib/commonjs/apiEnvironment.js.map +1 -0
- package/lib/commonjs/components/Button/index.js +119 -0
- package/lib/commonjs/components/Button/index.js.map +1 -0
- package/lib/commonjs/components/Cards/VideosCard/VideoContent.js +40 -0
- package/lib/commonjs/components/Cards/VideosCard/VideoContent.js.map +1 -0
- package/lib/commonjs/components/Cards/VideosCard/VideosCard.js +56 -0
- package/lib/commonjs/components/Cards/VideosCard/VideosCard.js.map +1 -0
- package/lib/commonjs/components/Cards/index.js +3 -0
- package/lib/commonjs/components/Cards/index.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Content/Content.js +20 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Content/Content.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Content/index.js +17 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Content/index.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js +83 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/index.js +17 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/index.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/StatsContainer/StatsContainer.js +18 -0
- package/lib/commonjs/components/Common/BaseOfferCard/StatsContainer/StatsContainer.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/StatsContainer/index.js +17 -0
- package/lib/commonjs/components/Common/BaseOfferCard/StatsContainer/index.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/ThumbsUpIcon.js +29 -0
- package/lib/commonjs/components/Common/BaseOfferCard/ThumbsUpIcon.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/index.js +254 -0
- package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/CallToAction.js +45 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/CallToAction.js.map +1 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js +72 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js.map +1 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/index.js +37 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/index.js.map +1 -0
- package/lib/commonjs/components/Common/index.js +27 -0
- package/lib/commonjs/components/Common/index.js.map +1 -0
- package/lib/commonjs/components/Divider/index.js +39 -0
- package/lib/commonjs/components/Divider/index.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/DynamicOffers.js +32 -0
- package/lib/commonjs/components/DynamicOffers/DynamicOffers.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js +49 -0
- package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js +205 -0
- package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/Render/FallbackOfferTemplate.js +28 -0
- package/lib/commonjs/components/DynamicOffers/Render/FallbackOfferTemplate.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/Render/Offer.js +70 -0
- package/lib/commonjs/components/DynamicOffers/Render/Offer.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/Render/index.js +20 -0
- package/lib/commonjs/components/DynamicOffers/Render/index.js.map +1 -0
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/index.js +65 -0
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/index.js.map +1 -0
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/statsBuilder.js +15 -0
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/statsBuilder.js.map +1 -0
- package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js +53 -0
- package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js.map +1 -0
- package/lib/commonjs/components/Layouts/DefaultOfferCard/statsBuilder.js +17 -0
- package/lib/commonjs/components/Layouts/DefaultOfferCard/statsBuilder.js.map +1 -0
- package/lib/commonjs/components/Layouts/HeadlineWithDescriptionCard/index.js +47 -0
- package/lib/commonjs/components/Layouts/HeadlineWithDescriptionCard/index.js.map +1 -0
- package/lib/commonjs/components/Layouts/index.js +27 -0
- package/lib/commonjs/components/Layouts/index.js.map +1 -0
- package/lib/commonjs/components/Modal/DescriptionPoints.js +28 -0
- package/lib/commonjs/components/Modal/DescriptionPoints.js.map +1 -0
- package/lib/commonjs/components/Modal/Disclaimer.js +27 -0
- package/lib/commonjs/components/Modal/Disclaimer.js.map +1 -0
- package/lib/commonjs/components/Modal/OfferDetailsModal.js +95 -0
- package/lib/commonjs/components/Modal/OfferDetailsModal.js.map +1 -0
- package/lib/commonjs/components/MoneyLionOfferCarousel.js +174 -0
- package/lib/commonjs/components/MoneyLionOfferCarousel.js.map +1 -0
- package/lib/commonjs/components/Skeleton/Skeleton.js +65 -0
- package/lib/commonjs/components/Skeleton/Skeleton.js.map +1 -0
- package/lib/commonjs/components/Skeleton/index.js +10 -0
- package/lib/commonjs/components/Skeleton/index.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +184 -0
- package/lib/commonjs/components/Text/index.js.map +1 -0
- package/lib/commonjs/components/View/index.js +162 -0
- package/lib/commonjs/components/View/index.js.map +1 -0
- package/lib/commonjs/context/CNFProvider.js +2 -0
- package/lib/commonjs/context/CNFProvider.js.map +1 -0
- package/lib/commonjs/context/EventHandlerProvider.js +25 -0
- package/lib/commonjs/context/EventHandlerProvider.js.map +1 -0
- package/lib/commonjs/context/ThemeProvider.js +59 -0
- package/lib/commonjs/context/ThemeProvider.js.map +1 -0
- package/lib/commonjs/deps/configuration.js +2 -0
- package/lib/commonjs/deps/configuration.js.map +1 -0
- package/lib/commonjs/index.js +17 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/pageData.js +93 -0
- package/lib/commonjs/pageData.js.map +1 -0
- package/lib/commonjs/services/getDynamicOffers.js +55 -0
- package/lib/commonjs/services/getDynamicOffers.js.map +1 -0
- package/lib/commonjs/services/getProductTypes.js +50 -0
- package/lib/commonjs/services/getProductTypes.js.map +1 -0
- package/lib/commonjs/services/getProductTypesByQuery.js +55 -0
- package/lib/commonjs/services/getProductTypesByQuery.js.map +1 -0
- package/lib/commonjs/utils/addClientTagsToOfferLinks.js +25 -0
- package/lib/commonjs/utils/addClientTagsToOfferLinks.js.map +1 -0
- package/lib/commonjs/utils/formatOfferUrl.js +31 -0
- package/lib/commonjs/utils/formatOfferUrl.js.map +1 -0
- package/lib/commonjs/utils/getDefaultPaletteColor.js +20 -0
- package/lib/commonjs/utils/getDefaultPaletteColor.js.map +1 -0
- package/lib/commonjs/utils/getDefaultProductType.js +9 -0
- package/lib/commonjs/utils/getDefaultProductType.js.map +1 -0
- package/lib/commonjs/utils/getEnableUseCachedOffers.js +21 -0
- package/lib/commonjs/utils/getEnableUseCachedOffers.js.map +1 -0
- package/lib/commonjs/utils/getOffersBasedOnLayout.js +48 -0
- package/lib/commonjs/utils/getOffersBasedOnLayout.js.map +1 -0
- package/lib/commonjs/utils/getOffersByProductTypes.js +31 -0
- package/lib/commonjs/utils/getOffersByProductTypes.js.map +1 -0
- package/lib/commonjs/utils/getProductTypesDefinition.js +17 -0
- package/lib/commonjs/utils/getProductTypesDefinition.js.map +1 -0
- package/lib/commonjs/utils/index.js +116 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/commonjs/utils/layouts.js +27 -0
- package/lib/commonjs/utils/layouts.js.map +1 -0
- package/lib/commonjs/utils/parseStringProductTypes.js +14 -0
- package/lib/commonjs/utils/parseStringProductTypes.js.map +1 -0
- package/lib/commonjs/utils/resolveProductTypes.js +12 -0
- package/lib/commonjs/utils/resolveProductTypes.js.map +1 -0
- package/lib/commonjs/utils/selectDynamicOffers.js +13 -0
- package/lib/commonjs/utils/selectDynamicOffers.js.map +1 -0
- package/lib/commonjs/utils/sortOffersByRecommendationScore.js +12 -0
- package/lib/commonjs/utils/sortOffersByRecommendationScore.js.map +1 -0
- package/lib/commonjs/version.js +10 -0
- package/lib/commonjs/version.js.map +1 -0
- package/lib/module/apiEnvironment.js +15 -0
- package/lib/module/apiEnvironment.js.map +1 -0
- package/lib/module/components/Button/index.js +111 -0
- package/lib/module/components/Button/index.js.map +1 -0
- package/lib/module/components/Cards/VideosCard/VideoContent.js +32 -0
- package/lib/module/components/Cards/VideosCard/VideoContent.js.map +1 -0
- package/lib/module/components/Cards/VideosCard/VideosCard.js +55 -0
- package/lib/module/components/Cards/VideosCard/VideosCard.js.map +1 -0
- package/lib/module/components/Cards/index.js +2 -0
- package/lib/module/components/Cards/index.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/Content/Content.js +13 -0
- package/lib/module/components/Common/BaseOfferCard/Content/Content.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/Content/index.js +2 -0
- package/lib/module/components/Common/BaseOfferCard/Content/index.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js +76 -0
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/Stat/index.js +2 -0
- package/lib/module/components/Common/BaseOfferCard/Stat/index.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/StatsContainer/StatsContainer.js +10 -0
- package/lib/module/components/Common/BaseOfferCard/StatsContainer/StatsContainer.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/StatsContainer/index.js +2 -0
- package/lib/module/components/Common/BaseOfferCard/StatsContainer/index.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/ThumbsUpIcon.js +21 -0
- package/lib/module/components/Common/BaseOfferCard/ThumbsUpIcon.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/index.js +248 -0
- package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -0
- package/lib/module/components/Common/DynamicOfferCard/CallToAction.js +37 -0
- package/lib/module/components/Common/DynamicOfferCard/CallToAction.js.map +1 -0
- package/lib/module/components/Common/DynamicOfferCard/SeeMore.js +62 -0
- package/lib/module/components/Common/DynamicOfferCard/SeeMore.js.map +1 -0
- package/lib/module/components/Common/DynamicOfferCard/index.js +31 -0
- package/lib/module/components/Common/DynamicOfferCard/index.js.map +1 -0
- package/lib/module/components/Common/index.js +4 -0
- package/lib/module/components/Common/index.js.map +1 -0
- package/lib/module/components/Divider/index.js +33 -0
- package/lib/module/components/Divider/index.js.map +1 -0
- package/lib/module/components/DynamicOffers/DynamicOffers.js +24 -0
- package/lib/module/components/DynamicOffers/DynamicOffers.js.map +1 -0
- package/lib/module/components/DynamicOffers/DynamicOffersContainer.js +40 -0
- package/lib/module/components/DynamicOffers/DynamicOffersContainer.js.map +1 -0
- package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js +196 -0
- package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -0
- package/lib/module/components/DynamicOffers/Render/FallbackOfferTemplate.js +21 -0
- package/lib/module/components/DynamicOffers/Render/FallbackOfferTemplate.js.map +1 -0
- package/lib/module/components/DynamicOffers/Render/Offer.js +61 -0
- package/lib/module/components/DynamicOffers/Render/Offer.js.map +1 -0
- package/lib/module/components/DynamicOffers/Render/index.js +3 -0
- package/lib/module/components/DynamicOffers/Render/index.js.map +1 -0
- package/lib/module/components/Layouts/CreditCardOfferCard/index.js +57 -0
- package/lib/module/components/Layouts/CreditCardOfferCard/index.js.map +1 -0
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js +8 -0
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js.map +1 -0
- package/lib/module/components/Layouts/DefaultOfferCard/index.js +45 -0
- package/lib/module/components/Layouts/DefaultOfferCard/index.js.map +1 -0
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js +10 -0
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js.map +1 -0
- package/lib/module/components/Layouts/HeadlineWithDescriptionCard/index.js +39 -0
- package/lib/module/components/Layouts/HeadlineWithDescriptionCard/index.js.map +1 -0
- package/lib/module/components/Layouts/index.js +4 -0
- package/lib/module/components/Layouts/index.js.map +1 -0
- package/lib/module/components/Modal/DescriptionPoints.js +21 -0
- package/lib/module/components/Modal/DescriptionPoints.js.map +1 -0
- package/lib/module/components/Modal/Disclaimer.js +20 -0
- package/lib/module/components/Modal/Disclaimer.js.map +1 -0
- package/lib/module/components/Modal/OfferDetailsModal.js +87 -0
- package/lib/module/components/Modal/OfferDetailsModal.js.map +1 -0
- package/lib/module/components/MoneyLionOfferCarousel.js +165 -0
- package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -0
- package/lib/module/components/Skeleton/Skeleton.js +57 -0
- package/lib/module/components/Skeleton/Skeleton.js.map +1 -0
- package/lib/module/components/Skeleton/index.js +3 -0
- package/lib/module/components/Skeleton/index.js.map +1 -0
- package/lib/module/components/Text/index.js +179 -0
- package/lib/module/components/Text/index.js.map +1 -0
- package/lib/module/components/View/index.js +155 -0
- package/lib/module/components/View/index.js.map +1 -0
- package/lib/module/context/CNFProvider.js +2 -0
- package/lib/module/context/CNFProvider.js.map +1 -0
- package/lib/module/context/EventHandlerProvider.js +15 -0
- package/lib/module/context/EventHandlerProvider.js.map +1 -0
- package/lib/module/context/ThemeProvider.js +49 -0
- package/lib/module/context/ThemeProvider.js.map +1 -0
- package/lib/module/deps/configuration.js +2 -0
- package/lib/module/deps/configuration.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/pageData.js +86 -0
- package/lib/module/pageData.js.map +1 -0
- package/lib/module/services/getDynamicOffers.js +48 -0
- package/lib/module/services/getDynamicOffers.js.map +1 -0
- package/lib/module/services/getProductTypes.js +43 -0
- package/lib/module/services/getProductTypes.js.map +1 -0
- package/lib/module/services/getProductTypesByQuery.js +48 -0
- package/lib/module/services/getProductTypesByQuery.js.map +1 -0
- package/lib/module/utils/addClientTagsToOfferLinks.js +18 -0
- package/lib/module/utils/addClientTagsToOfferLinks.js.map +1 -0
- package/lib/module/utils/formatOfferUrl.js +25 -0
- package/lib/module/utils/formatOfferUrl.js.map +1 -0
- package/lib/module/utils/getDefaultPaletteColor.js +13 -0
- package/lib/module/utils/getDefaultPaletteColor.js.map +1 -0
- package/lib/module/utils/getDefaultProductType.js +2 -0
- package/lib/module/utils/getDefaultProductType.js.map +1 -0
- package/lib/module/utils/getEnableUseCachedOffers.js +14 -0
- package/lib/module/utils/getEnableUseCachedOffers.js.map +1 -0
- package/lib/module/utils/getOffersBasedOnLayout.js +39 -0
- package/lib/module/utils/getOffersBasedOnLayout.js.map +1 -0
- package/lib/module/utils/getOffersByProductTypes.js +24 -0
- package/lib/module/utils/getOffersByProductTypes.js.map +1 -0
- package/lib/module/utils/getProductTypesDefinition.js +10 -0
- package/lib/module/utils/getProductTypesDefinition.js.map +1 -0
- package/lib/module/utils/index.js +11 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/layouts.js +20 -0
- package/lib/module/utils/layouts.js.map +1 -0
- package/lib/module/utils/parseStringProductTypes.js +7 -0
- package/lib/module/utils/parseStringProductTypes.js.map +1 -0
- package/lib/module/utils/resolveProductTypes.js +5 -0
- package/lib/module/utils/resolveProductTypes.js.map +1 -0
- package/lib/module/utils/selectDynamicOffers.js +6 -0
- package/lib/module/utils/selectDynamicOffers.js.map +1 -0
- package/lib/module/utils/sortOffersByRecommendationScore.js +5 -0
- package/lib/module/utils/sortOffersByRecommendationScore.js.map +1 -0
- package/lib/module/version.js +3 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/builder/builder.d.ts +24 -0
- package/lib/typescript/builder/builder.d.ts.map +1 -0
- package/lib/typescript/builder/config/types.d.ts +89 -0
- package/lib/typescript/builder/config/types.d.ts.map +1 -0
- package/lib/typescript/builder/index.d.ts +3 -0
- package/lib/typescript/builder/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/configuration/src/brands/checkVisualEligibility.d.ts +12 -0
- package/lib/typescript/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +1 -0
- package/lib/typescript/capabilities/configuration/src/brands/createDerivedBrands.d.ts +9 -0
- package/lib/typescript/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +1 -0
- package/lib/typescript/capabilities/configuration/src/brands/index.d.ts +3 -0
- package/lib/typescript/capabilities/configuration/src/brands/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/configuration/src/brands/types.d.ts +4 -0
- package/lib/typescript/capabilities/configuration/src/brands/types.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/domain/third-party-search/index.d.ts +2 -0
- package/lib/typescript/capabilities/core/src/domain/third-party-search/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts +19 -0
- package/lib/typescript/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/index.d.ts +2 -0
- package/lib/typescript/capabilities/core/src/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/CnfContext.d.ts +103 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/CnfContext.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/App.d.ts +13 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/App.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts +180 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts +59 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Request.d.ts +16 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Request.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Session.d.ts +8 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Session.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts +64 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts +18 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/index.d.ts +8 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts +5 -0
- package/lib/typescript/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/index.d.ts +6 -0
- package/lib/typescript/capabilities/offer-catalog/src/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts +91 -0
- package/lib/typescript/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts +2 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/contextUtil.d.ts +8 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/errorUtil.d.ts +6 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/errorUtil.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/formatUtils.d.ts +68 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts +24 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts +13 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts +11 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts +14 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts +10 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts +12 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts +20 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts +11 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts +12 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts +10 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts +12 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts +10 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts +10 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts +11 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/index.d.ts +5 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/types.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/types.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts +4 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts +1837 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts +5 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts +208 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts +7 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts +12 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts +2 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts +5 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/components.d.ts +9 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/index.d.ts +7 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts +2 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/index.d.ts +2 -0
- package/lib/typescript/capabilities/ui/elements/src/components/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/index.d.ts +10 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts +14 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/index.d.ts +3 -0
- package/lib/typescript/capabilities/ui/elements/src/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/offerCardAttributes.d.ts +10 -0
- package/lib/typescript/capabilities/ui/elements/src/offerCardAttributes.d.ts.map +1 -0
- package/lib/typescript/config/mocks/cnfContext.d.ts +3 -0
- package/lib/typescript/config/mocks/cnfContext.d.ts.map +1 -0
- package/lib/typescript/src/apiEnvironment.d.ts +13 -0
- package/lib/typescript/src/apiEnvironment.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/index.d.ts +15 -0
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Cards/VideosCard/VideoContent.d.ts +9 -0
- package/lib/typescript/src/components/Cards/VideosCard/VideoContent.d.ts.map +1 -0
- package/lib/typescript/src/components/Cards/VideosCard/VideosCard.d.ts +1 -0
- package/lib/typescript/src/components/Cards/VideosCard/VideosCard.d.ts.map +1 -0
- package/lib/typescript/src/components/Cards/index.d.ts +1 -0
- package/lib/typescript/src/components/Cards/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Content/Content.d.ts +4 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Content/Content.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Content/index.d.ts +2 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Content/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts +8 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/index.d.ts +2 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/StatsContainer/StatsContainer.d.ts +4 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/StatsContainer/StatsContainer.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/StatsContainer/index.d.ts +2 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/StatsContainer/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/ThumbsUpIcon.d.ts +3 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/ThumbsUpIcon.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts +42 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts +13 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts +8 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts +12 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/index.d.ts +4 -0
- package/lib/typescript/src/components/Common/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Divider/index.d.ts +16 -0
- package/lib/typescript/src/components/Divider/index.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts +12 -0
- package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/DynamicOffersContainer.d.ts +10 -0
- package/lib/typescript/src/components/DynamicOffers/DynamicOffersContainer.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts +19 -0
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts +9 -0
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts +17 -0
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/Render/index.d.ts +3 -0
- package/lib/typescript/src/components/DynamicOffers/Render/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts +13 -0
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts +6 -0
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts +13 -0
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts +7 -0
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts +13 -0
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/index.d.ts +4 -0
- package/lib/typescript/src/components/Layouts/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Modal/DescriptionPoints.d.ts +5 -0
- package/lib/typescript/src/components/Modal/DescriptionPoints.d.ts.map +1 -0
- package/lib/typescript/src/components/Modal/Disclaimer.d.ts +5 -0
- package/lib/typescript/src/components/Modal/Disclaimer.d.ts.map +1 -0
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts +11 -0
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -0
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts +20 -0
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts.map +1 -0
- package/lib/typescript/src/components/Skeleton/Skeleton.d.ts +12 -0
- package/lib/typescript/src/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/lib/typescript/src/components/Skeleton/index.d.ts +3 -0
- package/lib/typescript/src/components/Skeleton/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Text/index.d.ts +17 -0
- package/lib/typescript/src/components/Text/index.d.ts.map +1 -0
- package/lib/typescript/src/components/View/index.d.ts +23 -0
- package/lib/typescript/src/components/View/index.d.ts.map +1 -0
- package/lib/typescript/src/context/CNFProvider.d.ts +1 -0
- package/lib/typescript/src/context/CNFProvider.d.ts.map +1 -0
- package/lib/typescript/src/context/EventHandlerProvider.d.ts +71 -0
- package/lib/typescript/src/context/EventHandlerProvider.d.ts.map +1 -0
- package/lib/typescript/src/context/ThemeProvider.d.ts +31 -0
- package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/src/deps/configuration.d.ts +1 -0
- package/lib/typescript/src/deps/configuration.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/pageData.d.ts +19 -0
- package/lib/typescript/src/pageData.d.ts.map +1 -0
- package/lib/typescript/src/services/getDynamicOffers.d.ts +27 -0
- package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -0
- package/lib/typescript/src/services/getProductTypes.d.ts +19 -0
- package/lib/typescript/src/services/getProductTypes.d.ts.map +1 -0
- package/lib/typescript/src/services/getProductTypesByQuery.d.ts +28 -0
- package/lib/typescript/src/services/getProductTypesByQuery.d.ts.map +1 -0
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts +9 -0
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts.map +1 -0
- package/lib/typescript/src/utils/formatOfferUrl.d.ts +64 -0
- package/lib/typescript/src/utils/formatOfferUrl.d.ts.map +1 -0
- package/lib/typescript/src/utils/getDefaultPaletteColor.d.ts +3 -0
- package/lib/typescript/src/utils/getDefaultPaletteColor.d.ts.map +1 -0
- package/lib/typescript/src/utils/getDefaultProductType.d.ts +3 -0
- package/lib/typescript/src/utils/getDefaultProductType.d.ts.map +1 -0
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts +12 -0
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts.map +1 -0
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts +26 -0
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts.map +1 -0
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts +17 -0
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts.map +1 -0
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts +14 -0
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts.map +1 -0
- package/lib/typescript/src/utils/index.d.ts +11 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/layouts.d.ts +19 -0
- package/lib/typescript/src/utils/layouts.d.ts.map +1 -0
- package/lib/typescript/src/utils/parseStringProductTypes.d.ts +2 -0
- package/lib/typescript/src/utils/parseStringProductTypes.d.ts.map +1 -0
- package/lib/typescript/src/utils/resolveProductTypes.d.ts +14 -0
- package/lib/typescript/src/utils/resolveProductTypes.d.ts.map +1 -0
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts +3 -0
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +1 -0
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts +3 -0
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts.map +1 -0
- package/lib/typescript/src/version.d.ts +2 -0
- package/lib/typescript/src/version.d.ts.map +1 -0
- package/package.json +139 -0
- package/src/apiEnvironment.ts +17 -0
- package/src/components/Button/index.tsx +140 -0
- package/src/components/Cards/VideosCard/VideoContent.tsx +38 -0
- package/src/components/Cards/VideosCard/VideosCard.tsx +54 -0
- package/src/components/Cards/index.ts +1 -0
- package/src/components/Common/BaseOfferCard/Content/Content.tsx +10 -0
- package/src/components/Common/BaseOfferCard/Content/index.tsx +1 -0
- package/src/components/Common/BaseOfferCard/Stat/Stat.tsx +91 -0
- package/src/components/Common/BaseOfferCard/Stat/index.tsx +1 -0
- package/src/components/Common/BaseOfferCard/StatsContainer/StatsContainer.tsx +8 -0
- package/src/components/Common/BaseOfferCard/StatsContainer/index.tsx +1 -0
- package/src/components/Common/BaseOfferCard/ThumbsUpIcon.tsx +27 -0
- package/src/components/Common/BaseOfferCard/index.tsx +282 -0
- package/src/components/Common/DynamicOfferCard/CallToAction.tsx +47 -0
- package/src/components/Common/DynamicOfferCard/SeeMore.tsx +76 -0
- package/src/components/Common/DynamicOfferCard/index.tsx +64 -0
- package/src/components/Common/index.ts +3 -0
- package/src/components/Divider/index.tsx +35 -0
- package/src/components/DynamicOffers/DynamicOffers.tsx +46 -0
- package/src/components/DynamicOffers/DynamicOffersContainer.tsx +41 -0
- package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +261 -0
- package/src/components/DynamicOffers/Render/FallbackOfferTemplate.tsx +29 -0
- package/src/components/DynamicOffers/Render/Offer.tsx +100 -0
- package/src/components/DynamicOffers/Render/index.ts +2 -0
- package/src/components/Layouts/CreditCardOfferCard/index.tsx +96 -0
- package/src/components/Layouts/CreditCardOfferCard/statsBuilder.tsx +10 -0
- package/src/components/Layouts/DefaultOfferCard/index.tsx +72 -0
- package/src/components/Layouts/DefaultOfferCard/statsBuilder.tsx +14 -0
- package/src/components/Layouts/HeadlineWithDescriptionCard/index.tsx +59 -0
- package/src/components/Layouts/index.ts +3 -0
- package/src/components/Modal/DescriptionPoints.tsx +24 -0
- package/src/components/Modal/Disclaimer.tsx +15 -0
- package/src/components/Modal/OfferDetailsModal.tsx +111 -0
- package/src/components/MoneyLionOfferCarousel.tsx +202 -0
- package/src/components/Skeleton/Skeleton.tsx +86 -0
- package/src/components/Skeleton/index.ts +2 -0
- package/src/components/Text/index.tsx +209 -0
- package/src/components/View/index.tsx +144 -0
- package/src/context/CNFProvider.tsx +0 -0
- package/src/context/EventHandlerProvider.tsx +89 -0
- package/src/context/ThemeProvider.tsx +91 -0
- package/src/deps/configuration.ts +0 -0
- package/src/index.tsx +1 -0
- package/src/pageData.ts +98 -0
- package/src/services/getDynamicOffers.ts +93 -0
- package/src/services/getProductTypes.ts +53 -0
- package/src/services/getProductTypesByQuery.ts +53 -0
- package/src/utils/addClientTagsToOfferLinks.ts +22 -0
- package/src/utils/formatOfferUrl.ts +32 -0
- package/src/utils/getDefaultPaletteColor.ts +15 -0
- package/src/utils/getDefaultProductType.ts +4 -0
- package/src/utils/getEnableUseCachedOffers.ts +13 -0
- package/src/utils/getOffersBasedOnLayout.ts +51 -0
- package/src/utils/getOffersByProductTypes.ts +36 -0
- package/src/utils/getProductTypesDefinition.ts +13 -0
- package/src/utils/index.ts +10 -0
- package/src/utils/layouts.ts +22 -0
- package/src/utils/parseStringProductTypes.ts +7 -0
- package/src/utils/resolveProductTypes.ts +18 -0
- package/src/utils/selectDynamicOffers.ts +18 -0
- package/src/utils/sortOffersByRecommendationScore.ts +6 -0
- package/src/version.ts +2 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { type ComponentProps } from "react";
|
|
2
|
+
import { BaseOfferCard } from "../BaseOfferCard";
|
|
3
|
+
import type { BaseOffer } from "../../../../capabilities/offer-catalog/src";
|
|
4
|
+
import type Button from "../../Button";
|
|
5
|
+
import { Linking } from "react-native";
|
|
6
|
+
import { useEventHandler } from "../../../context/EventHandlerProvider";
|
|
7
|
+
|
|
8
|
+
export type CTAProps = ComponentProps<typeof Button & { href: string }> & {
|
|
9
|
+
overrideUrl?: string;
|
|
10
|
+
offer: BaseOffer;
|
|
11
|
+
context: "offer" | "offer_details";
|
|
12
|
+
offerIndex: number;
|
|
13
|
+
// trackEvent: EventServerAction;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const CallToAction = ({
|
|
17
|
+
children,
|
|
18
|
+
offer,
|
|
19
|
+
context,
|
|
20
|
+
offerIndex,
|
|
21
|
+
...rest
|
|
22
|
+
}: CTAProps) => {
|
|
23
|
+
const { onOfferClick, rateTableUuid, leadUuid } = useEventHandler();
|
|
24
|
+
return (
|
|
25
|
+
<BaseOfferCard.CallToAction
|
|
26
|
+
onPress={() => {
|
|
27
|
+
onOfferClick?.({
|
|
28
|
+
timestamp: new Date().toISOString(),
|
|
29
|
+
offerUuid: offer.uuid,
|
|
30
|
+
rateTableUuid,
|
|
31
|
+
leadUuid,
|
|
32
|
+
offer,
|
|
33
|
+
offerIndex,
|
|
34
|
+
context,
|
|
35
|
+
});
|
|
36
|
+
Linking.canOpenURL(offer.url).then((supported) => {
|
|
37
|
+
if (supported) {
|
|
38
|
+
Linking.openURL(offer.url);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}}
|
|
42
|
+
{...rest}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
</BaseOfferCard.CallToAction>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React, { useCallback, useState } from "react";
|
|
2
|
+
import type { BaseOffer } from "../../../../capabilities/offer-catalog/src";
|
|
3
|
+
import Text from "../../Text";
|
|
4
|
+
import { TouchableOpacity, StyleSheet } from "react-native";
|
|
5
|
+
import { OfferDetailsModal } from "../../Modal/OfferDetailsModal";
|
|
6
|
+
import { useEventHandler } from "../../../context/EventHandlerProvider";
|
|
7
|
+
|
|
8
|
+
export type SeeMoreProps = {
|
|
9
|
+
offer: BaseOffer;
|
|
10
|
+
offerIndex: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const SeeMore = ({ offer, offerIndex }: SeeMoreProps) => {
|
|
14
|
+
const [modalVisible, setModalVisible] = useState(false);
|
|
15
|
+
const {
|
|
16
|
+
onOfferDetailsPageOpen,
|
|
17
|
+
onOfferDetailsPageClose,
|
|
18
|
+
rateTableUuid,
|
|
19
|
+
leadUuid,
|
|
20
|
+
} = useEventHandler();
|
|
21
|
+
|
|
22
|
+
const handleMoreInfoClick = useCallback(() => {
|
|
23
|
+
onOfferDetailsPageOpen?.({
|
|
24
|
+
timestamp: new Date().toISOString(),
|
|
25
|
+
offerUuid: offer.uuid,
|
|
26
|
+
leadUuid: leadUuid,
|
|
27
|
+
offer,
|
|
28
|
+
offerIndex,
|
|
29
|
+
rateTableUuid,
|
|
30
|
+
});
|
|
31
|
+
setModalVisible(true);
|
|
32
|
+
}, [leadUuid, offer, offerIndex, onOfferDetailsPageOpen, rateTableUuid]);
|
|
33
|
+
|
|
34
|
+
const handleCloseModal = useCallback(() => {
|
|
35
|
+
onOfferDetailsPageClose?.({
|
|
36
|
+
timestamp: new Date().toISOString(),
|
|
37
|
+
offerUuid: offer.uuid,
|
|
38
|
+
leadUuid: leadUuid,
|
|
39
|
+
offer,
|
|
40
|
+
offerIndex,
|
|
41
|
+
rateTableUuid,
|
|
42
|
+
});
|
|
43
|
+
setModalVisible(false);
|
|
44
|
+
}, [leadUuid, offer, offerIndex, onOfferDetailsPageClose, rateTableUuid]);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<>
|
|
48
|
+
<TouchableOpacity onPress={handleMoreInfoClick} style={styles.container}>
|
|
49
|
+
<Text
|
|
50
|
+
variant={"body-3"}
|
|
51
|
+
color={"neutral"}
|
|
52
|
+
weight={"medium"}
|
|
53
|
+
style={styles.text}
|
|
54
|
+
>
|
|
55
|
+
See details
|
|
56
|
+
</Text>
|
|
57
|
+
</TouchableOpacity>
|
|
58
|
+
|
|
59
|
+
<OfferDetailsModal
|
|
60
|
+
offerIndex={offerIndex}
|
|
61
|
+
visible={modalVisible}
|
|
62
|
+
offer={offer}
|
|
63
|
+
onClose={handleCloseModal}
|
|
64
|
+
/>
|
|
65
|
+
</>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const styles = StyleSheet.create({
|
|
70
|
+
container: {
|
|
71
|
+
marginTop: 12,
|
|
72
|
+
},
|
|
73
|
+
text: {
|
|
74
|
+
textDecorationLine: "underline",
|
|
75
|
+
},
|
|
76
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { BaseOffer } from "../../../../capabilities/offer-catalog/src";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BaseOfferCard } from "../BaseOfferCard";
|
|
4
|
+
import { CallToAction } from "./CallToAction";
|
|
5
|
+
import { StyleSheet } from "react-native";
|
|
6
|
+
|
|
7
|
+
type DefaultOfferCatalogOfferType = {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
offer: BaseOffer;
|
|
10
|
+
offerIndex: number;
|
|
11
|
+
showBorder: boolean;
|
|
12
|
+
showProductTypeLabel?: boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
function DynamicOfferCard({
|
|
16
|
+
children,
|
|
17
|
+
offer,
|
|
18
|
+
offerIndex,
|
|
19
|
+
showBorder,
|
|
20
|
+
showProductTypeLabel,
|
|
21
|
+
}: DefaultOfferCatalogOfferType) {
|
|
22
|
+
return (
|
|
23
|
+
<BaseOfferCard showBorder={showBorder}>
|
|
24
|
+
{showProductTypeLabel && (
|
|
25
|
+
<BaseOfferCard.TopBar>
|
|
26
|
+
<BaseOfferCard.ProductType>
|
|
27
|
+
{offer.productDisplayName}
|
|
28
|
+
</BaseOfferCard.ProductType>
|
|
29
|
+
</BaseOfferCard.TopBar>
|
|
30
|
+
)}
|
|
31
|
+
<BaseOfferCard.Container>
|
|
32
|
+
<BaseOfferCard.PartnerContainer>
|
|
33
|
+
<BaseOfferCard.PartnerImage
|
|
34
|
+
src={offer.financialInstitutionImageUrl}
|
|
35
|
+
alt={offer.financialInstitutionDisplayName}
|
|
36
|
+
/>
|
|
37
|
+
<BaseOfferCard.Content>{children}</BaseOfferCard.Content>
|
|
38
|
+
</BaseOfferCard.PartnerContainer>
|
|
39
|
+
|
|
40
|
+
<BaseOfferCard.BottomBar>
|
|
41
|
+
<CallToAction
|
|
42
|
+
offer={offer}
|
|
43
|
+
overrideUrl={offer.overrideUrl}
|
|
44
|
+
style={styles.cta}
|
|
45
|
+
context="offer"
|
|
46
|
+
offerIndex={offerIndex}
|
|
47
|
+
>
|
|
48
|
+
{"Continue"}
|
|
49
|
+
</CallToAction>
|
|
50
|
+
{/* Move this back when we have mocked or api data ready */}
|
|
51
|
+
{/* <Hidden hide={socialProof === "none"}>
|
|
52
|
+
<BaseOfferCard.ChosenBy>300</BaseOfferCard.ChosenBy>
|
|
53
|
+
</Hidden> */}
|
|
54
|
+
</BaseOfferCard.BottomBar>
|
|
55
|
+
</BaseOfferCard.Container>
|
|
56
|
+
</BaseOfferCard>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { DynamicOfferCard };
|
|
61
|
+
|
|
62
|
+
const styles = StyleSheet.create({
|
|
63
|
+
cta: { marginTop: 20 },
|
|
64
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View, StyleSheet, type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A simple horizontal divider component for React Native.
|
|
6
|
+
* @param {Object} props - Component props
|
|
7
|
+
* @param {string} [props.color] - Optional color for the divider (defaults to a neutral border color)
|
|
8
|
+
* @param {Object} [props.style] - Optional additional styles
|
|
9
|
+
* @returns {JSX.Element} - Rendered divider
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export interface DividerProps {
|
|
13
|
+
color?: string;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const Divider = ({ color, style }: DividerProps) => {
|
|
18
|
+
return (
|
|
19
|
+
<View
|
|
20
|
+
style={[styles.divider, color ? { backgroundColor: color } : null, style]}
|
|
21
|
+
accessible={true}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const styles = StyleSheet.create({
|
|
27
|
+
divider: {
|
|
28
|
+
height: 1,
|
|
29
|
+
width: "100%",
|
|
30
|
+
backgroundColor: "#E0E0E0", // Default neutral border color
|
|
31
|
+
marginVertical: 12,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export default Divider;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { productTypeBuilder } from "../../../builder/builder";
|
|
3
|
+
import { DynamicOffersRender, FallbackOfferTemplate } from "./Render";
|
|
4
|
+
import type { DynamicOffersRenderProps } from "./Render/DynamicOffersRender";
|
|
5
|
+
import type { Layout } from "../../utils";
|
|
6
|
+
import { View } from "react-native";
|
|
7
|
+
|
|
8
|
+
export type DynamicOfferProps = {
|
|
9
|
+
title: string;
|
|
10
|
+
displayLayout: Layout;
|
|
11
|
+
showBorder: boolean;
|
|
12
|
+
showProductTypeLabel?: boolean;
|
|
13
|
+
shouldHideFooter: boolean;
|
|
14
|
+
} & Pick<DynamicOffersRenderProps, "offers">;
|
|
15
|
+
|
|
16
|
+
export const DynamicOffers = ({
|
|
17
|
+
title,
|
|
18
|
+
displayLayout,
|
|
19
|
+
showBorder,
|
|
20
|
+
showProductTypeLabel,
|
|
21
|
+
// shouldHideFooter,
|
|
22
|
+
offers,
|
|
23
|
+
}: DynamicOfferProps): React.JSX.Element => {
|
|
24
|
+
if (offers.length === 0) return <></>;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<View>
|
|
28
|
+
{/* TODO: Need to check what is this used for?? */}
|
|
29
|
+
{/*
|
|
30
|
+
<ListDisplayedEventTracker
|
|
31
|
+
offerUuids={offers.map((offer) => offer.uuid as OfferUuid)}
|
|
32
|
+
/>
|
|
33
|
+
*/}
|
|
34
|
+
<DynamicOffersRender
|
|
35
|
+
title={title}
|
|
36
|
+
offers={offers}
|
|
37
|
+
displayLayout={displayLayout}
|
|
38
|
+
fallbackTemplate={FallbackOfferTemplate}
|
|
39
|
+
productTypeBuilder={productTypeBuilder}
|
|
40
|
+
showBorder={showBorder}
|
|
41
|
+
showProductTypeLabel={showProductTypeLabel}
|
|
42
|
+
/>
|
|
43
|
+
{/* {!shouldHideFooter && <Footer offers={offers} />} */}
|
|
44
|
+
</View>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { Suspense } from "react";
|
|
2
|
+
import { match } from "ts-pattern";
|
|
3
|
+
import type { Layout } from "../../utils";
|
|
4
|
+
import { DynamicOffers, type DynamicOfferProps } from "./DynamicOffers";
|
|
5
|
+
import Skeleton from "../Skeleton";
|
|
6
|
+
import { View, StyleSheet } from "react-native";
|
|
7
|
+
|
|
8
|
+
export const DynamicOfferSkeleton = React.memo(
|
|
9
|
+
({ displayLayout = "carousel" }: { displayLayout?: Layout }) =>
|
|
10
|
+
match(displayLayout)
|
|
11
|
+
.with("fixed", () => <Skeleton height={300} />)
|
|
12
|
+
.otherwise(() => (
|
|
13
|
+
<View style={styles.skeletonContainer}>
|
|
14
|
+
<Skeleton height={10} width={73} />
|
|
15
|
+
<Skeleton height={300} />
|
|
16
|
+
</View>
|
|
17
|
+
))
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const DynamicOffersContainer = React.memo(
|
|
21
|
+
({ config }: { config: DynamicOfferProps }) => {
|
|
22
|
+
return (
|
|
23
|
+
<Suspense
|
|
24
|
+
fallback={<DynamicOfferSkeleton displayLayout={config.displayLayout} />}
|
|
25
|
+
>
|
|
26
|
+
<DynamicOffers
|
|
27
|
+
offers={config.offers}
|
|
28
|
+
title={config.title}
|
|
29
|
+
showProductTypeLabel={config.showProductTypeLabel}
|
|
30
|
+
displayLayout={config.displayLayout}
|
|
31
|
+
showBorder={config.showBorder}
|
|
32
|
+
shouldHideFooter={config.shouldHideFooter}
|
|
33
|
+
/>
|
|
34
|
+
</Suspense>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const styles = StyleSheet.create({
|
|
40
|
+
skeletonContainer: { gap: 2, width: "100%" },
|
|
41
|
+
});
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
useCallback,
|
|
3
|
+
useEffect,
|
|
4
|
+
useMemo,
|
|
5
|
+
useRef,
|
|
6
|
+
useState,
|
|
7
|
+
} from "react";
|
|
8
|
+
import type { BaseOffer } from "../../../../capabilities/offer-catalog/src/types/offerCatalogSchema";
|
|
9
|
+
import type { Layout } from "../../../utils";
|
|
10
|
+
import { productTypeBuilder as builder } from "../../../../builder/builder";
|
|
11
|
+
import { Offer } from "./Offer";
|
|
12
|
+
import {
|
|
13
|
+
InteractionManager,
|
|
14
|
+
ScrollView,
|
|
15
|
+
StyleSheet,
|
|
16
|
+
View,
|
|
17
|
+
type LayoutChangeEvent,
|
|
18
|
+
type NativeScrollEvent,
|
|
19
|
+
type NativeSyntheticEvent,
|
|
20
|
+
} from "react-native";
|
|
21
|
+
import { useEventHandler } from "../../../context/EventHandlerProvider";
|
|
22
|
+
|
|
23
|
+
export type DynamicOffersRenderProps = {
|
|
24
|
+
title: string;
|
|
25
|
+
offers: BaseOffer[];
|
|
26
|
+
displayLayout: Layout;
|
|
27
|
+
fallbackTemplate?: React.FC<{
|
|
28
|
+
offer: BaseOffer;
|
|
29
|
+
showProductTypeLabel?: boolean;
|
|
30
|
+
offerIndex: number;
|
|
31
|
+
}>;
|
|
32
|
+
productTypeBuilder: typeof builder;
|
|
33
|
+
showBorder: boolean;
|
|
34
|
+
showProductTypeLabel?: boolean;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const DynamicOffersRender = ({
|
|
38
|
+
title,
|
|
39
|
+
offers,
|
|
40
|
+
displayLayout,
|
|
41
|
+
productTypeBuilder = builder,
|
|
42
|
+
fallbackTemplate,
|
|
43
|
+
showBorder,
|
|
44
|
+
showProductTypeLabel,
|
|
45
|
+
}: DynamicOffersRenderProps) => {
|
|
46
|
+
// Performance optimization: store card measurements
|
|
47
|
+
const [cardLayouts, setCardLayouts] = useState<
|
|
48
|
+
Record<string, { x: number; width: number }>
|
|
49
|
+
>({});
|
|
50
|
+
const [scrollViewWidth, setScrollViewWidth] = useState(0);
|
|
51
|
+
const [scrollOffset, setScrollOffset] = useState(0);
|
|
52
|
+
|
|
53
|
+
// Callback to fire when offer is displayed in viewport
|
|
54
|
+
const { onOfferDisplayInViewport, leadUuid, rateTableUuid } =
|
|
55
|
+
useEventHandler();
|
|
56
|
+
|
|
57
|
+
// Track which offers have been viewed
|
|
58
|
+
const viewedOffers = useRef<Set<string>>(new Set());
|
|
59
|
+
|
|
60
|
+
// Track if initial visibility check has been done
|
|
61
|
+
const initialCheckDone = useRef(false);
|
|
62
|
+
|
|
63
|
+
// Reset tracking when offers change
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
viewedOffers.current = new Set();
|
|
66
|
+
initialCheckDone.current = false;
|
|
67
|
+
setCardLayouts({});
|
|
68
|
+
}, [offers]);
|
|
69
|
+
|
|
70
|
+
// Handle card layout measurements
|
|
71
|
+
const handleCardLayout = useCallback(
|
|
72
|
+
(offerId: string, event: LayoutChangeEvent) => {
|
|
73
|
+
const { x, width } = event.nativeEvent.layout;
|
|
74
|
+
|
|
75
|
+
setCardLayouts((prev) => {
|
|
76
|
+
// Only update if measurements changed
|
|
77
|
+
if (
|
|
78
|
+
prev[offerId] &&
|
|
79
|
+
prev[offerId]?.x === x &&
|
|
80
|
+
prev[offerId]?.width === width
|
|
81
|
+
) {
|
|
82
|
+
return prev;
|
|
83
|
+
}
|
|
84
|
+
return { ...prev, [offerId]: { x, width } };
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
[]
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
// Check which offers are visible
|
|
91
|
+
const checkVisibleOffers = useCallback(() => {
|
|
92
|
+
if (!onOfferDisplayInViewport || !scrollViewWidth) return;
|
|
93
|
+
|
|
94
|
+
// Calculate visible range
|
|
95
|
+
const visibleLeft = scrollOffset;
|
|
96
|
+
const visibleRight = scrollOffset + scrollViewWidth;
|
|
97
|
+
|
|
98
|
+
// Check each offer's visibility
|
|
99
|
+
offers.forEach((offer, index) => {
|
|
100
|
+
// Skip if already tracked
|
|
101
|
+
if (viewedOffers.current.has(offer.uuid)) return;
|
|
102
|
+
|
|
103
|
+
const layout = cardLayouts[offer.uuid];
|
|
104
|
+
if (!layout) return;
|
|
105
|
+
|
|
106
|
+
// Calculate card position
|
|
107
|
+
const cardLeft = layout.x;
|
|
108
|
+
const cardRight = cardLeft + layout.width;
|
|
109
|
+
const cardWidth = layout.width;
|
|
110
|
+
|
|
111
|
+
// Calculate visibility
|
|
112
|
+
let visibleWidth = 0;
|
|
113
|
+
|
|
114
|
+
if (cardLeft >= visibleLeft && cardRight <= visibleRight) {
|
|
115
|
+
// Fully visible
|
|
116
|
+
visibleWidth = cardWidth;
|
|
117
|
+
} else if (cardLeft < visibleLeft && cardRight > visibleLeft) {
|
|
118
|
+
// Partly visible from left
|
|
119
|
+
visibleWidth = cardRight - visibleLeft;
|
|
120
|
+
} else if (cardLeft < visibleRight && cardRight > visibleRight) {
|
|
121
|
+
// Partly visible from right
|
|
122
|
+
visibleWidth = visibleRight - cardLeft;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Calculate visibility percentage
|
|
126
|
+
const visibilityPercentage = (visibleWidth / cardWidth) * 100;
|
|
127
|
+
|
|
128
|
+
// If ≥50% visible, track it and fire callback
|
|
129
|
+
if (visibilityPercentage >= 50) {
|
|
130
|
+
viewedOffers.current.add(offer.uuid);
|
|
131
|
+
|
|
132
|
+
onOfferDisplayInViewport({
|
|
133
|
+
timestamp: new Date().toISOString(),
|
|
134
|
+
offerUuid: offer.uuid,
|
|
135
|
+
leadUuid,
|
|
136
|
+
offer,
|
|
137
|
+
offerIndex: index,
|
|
138
|
+
rateTableUuid,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}, [
|
|
143
|
+
cardLayouts,
|
|
144
|
+
leadUuid,
|
|
145
|
+
offers,
|
|
146
|
+
onOfferDisplayInViewport,
|
|
147
|
+
rateTableUuid,
|
|
148
|
+
scrollOffset,
|
|
149
|
+
scrollViewWidth,
|
|
150
|
+
]);
|
|
151
|
+
|
|
152
|
+
// Handle ScrollView layout
|
|
153
|
+
const handleScrollViewLayout = useCallback(
|
|
154
|
+
(event: LayoutChangeEvent) => {
|
|
155
|
+
const { width } = event.nativeEvent.layout;
|
|
156
|
+
setScrollViewWidth(width);
|
|
157
|
+
|
|
158
|
+
// Do an initial visibility check after layout
|
|
159
|
+
InteractionManager.runAfterInteractions(() => {
|
|
160
|
+
checkVisibleOffers();
|
|
161
|
+
initialCheckDone.current = true;
|
|
162
|
+
});
|
|
163
|
+
},
|
|
164
|
+
[checkVisibleOffers]
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
// Handle scroll events
|
|
168
|
+
const handleScroll = useCallback(
|
|
169
|
+
(event: NativeSyntheticEvent<NativeScrollEvent>) => {
|
|
170
|
+
const offsetX = event.nativeEvent.contentOffset.x;
|
|
171
|
+
setScrollOffset(offsetX);
|
|
172
|
+
},
|
|
173
|
+
[]
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
// Memoize offer components to prevent unnecessary re-renders
|
|
177
|
+
const offerComponents = useMemo(() => {
|
|
178
|
+
// Create offer components
|
|
179
|
+
return displayLayout === "fixed"
|
|
180
|
+
? [
|
|
181
|
+
// <VideosCard key="videos-card" videosContent={videosContent} showBorder={showBorder} />,
|
|
182
|
+
...Offer({
|
|
183
|
+
productTypeBuilder,
|
|
184
|
+
offers,
|
|
185
|
+
showProductTypeLabel,
|
|
186
|
+
fallbackTemplate,
|
|
187
|
+
showBorder,
|
|
188
|
+
}),
|
|
189
|
+
]
|
|
190
|
+
: Offer({
|
|
191
|
+
productTypeBuilder,
|
|
192
|
+
offers,
|
|
193
|
+
showProductTypeLabel,
|
|
194
|
+
fallbackTemplate,
|
|
195
|
+
showBorder,
|
|
196
|
+
});
|
|
197
|
+
}, [
|
|
198
|
+
displayLayout,
|
|
199
|
+
productTypeBuilder,
|
|
200
|
+
offers,
|
|
201
|
+
showProductTypeLabel,
|
|
202
|
+
fallbackTemplate,
|
|
203
|
+
showBorder,
|
|
204
|
+
]);
|
|
205
|
+
|
|
206
|
+
// Wrapped offer components with layout measurement
|
|
207
|
+
const wrappedOfferComponents = useMemo(() => {
|
|
208
|
+
return offerComponents.map((component, index) => {
|
|
209
|
+
// Skip non-offer items
|
|
210
|
+
if (index >= offers.length) return component;
|
|
211
|
+
|
|
212
|
+
const offer = offers[index];
|
|
213
|
+
if (!offer) return component;
|
|
214
|
+
|
|
215
|
+
return (
|
|
216
|
+
<View
|
|
217
|
+
key={`offer-wrapper-${index}-${offer.uuid}`}
|
|
218
|
+
onLayout={(e) => handleCardLayout(offer.uuid, e)}
|
|
219
|
+
>
|
|
220
|
+
{component}
|
|
221
|
+
</View>
|
|
222
|
+
);
|
|
223
|
+
});
|
|
224
|
+
}, [offerComponents, offers, handleCardLayout]);
|
|
225
|
+
|
|
226
|
+
// Check visibility whenever relevant values change
|
|
227
|
+
useEffect(() => {
|
|
228
|
+
if (!initialCheckDone.current || Object.keys(cardLayouts).length === 0)
|
|
229
|
+
return;
|
|
230
|
+
|
|
231
|
+
// Debounce the visibility check slightly for performance
|
|
232
|
+
const timeoutId = setTimeout(checkVisibleOffers, 100);
|
|
233
|
+
return () => clearTimeout(timeoutId);
|
|
234
|
+
}, [checkVisibleOffers, scrollOffset, scrollViewWidth, cardLayouts]);
|
|
235
|
+
|
|
236
|
+
return (
|
|
237
|
+
// <OffersCarousel title={title} displayLayout={displayLayout}>
|
|
238
|
+
<>
|
|
239
|
+
{title}
|
|
240
|
+
<ScrollView
|
|
241
|
+
horizontal={true}
|
|
242
|
+
showsHorizontalScrollIndicator={false}
|
|
243
|
+
contentContainerStyle={styles.contentContainer}
|
|
244
|
+
onLayout={handleScrollViewLayout}
|
|
245
|
+
onScroll={handleScroll}
|
|
246
|
+
scrollEventThrottle={16} // Lower number for more precision, higher for better performance
|
|
247
|
+
>
|
|
248
|
+
{wrappedOfferComponents}
|
|
249
|
+
</ScrollView>
|
|
250
|
+
</>
|
|
251
|
+
|
|
252
|
+
// </OffersCarousel>
|
|
253
|
+
);
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
const styles = StyleSheet.create({
|
|
257
|
+
contentContainer: {
|
|
258
|
+
columnGap: 20,
|
|
259
|
+
paddingHorizontal: 16,
|
|
260
|
+
},
|
|
261
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HeadlineWithDescriptionCard } from "../../Layouts/HeadlineWithDescriptionCard";
|
|
3
|
+
import type { BaseOffer } from "../../../../capabilities/offer-catalog/src";
|
|
4
|
+
|
|
5
|
+
export function FallbackOfferTemplate({
|
|
6
|
+
offer,
|
|
7
|
+
offerIndex,
|
|
8
|
+
showBorder = true,
|
|
9
|
+
showProductTypeLabel = true,
|
|
10
|
+
}: {
|
|
11
|
+
offer: BaseOffer;
|
|
12
|
+
offerIndex: number;
|
|
13
|
+
showBorder?: boolean;
|
|
14
|
+
showProductTypeLabel?: boolean;
|
|
15
|
+
}) {
|
|
16
|
+
return (
|
|
17
|
+
<HeadlineWithDescriptionCard
|
|
18
|
+
key={`${offerIndex}-${offer.uuid}`}
|
|
19
|
+
offer={offer}
|
|
20
|
+
offerIndex={offerIndex}
|
|
21
|
+
productTypeBuilder={{
|
|
22
|
+
productTypes: [],
|
|
23
|
+
layout: "headlineWithDescriptionCard",
|
|
24
|
+
}}
|
|
25
|
+
showBorder={showBorder}
|
|
26
|
+
showProductTypeLabel={showProductTypeLabel}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React, { Fragment } from "react";
|
|
2
|
+
|
|
3
|
+
import { match } from "ts-pattern";
|
|
4
|
+
|
|
5
|
+
import type { ProductTypeBuilder } from "../../../../builder";
|
|
6
|
+
import type { BaseOffer } from "../../../../capabilities/offer-catalog/src";
|
|
7
|
+
import {
|
|
8
|
+
DefaultOfferCard,
|
|
9
|
+
CreditCardOfferCard,
|
|
10
|
+
HeadlineWithDescriptionCard,
|
|
11
|
+
} from "../../Layouts";
|
|
12
|
+
|
|
13
|
+
type RenderOfferListProps = {
|
|
14
|
+
productTypeBuilder: ProductTypeBuilder;
|
|
15
|
+
offers: BaseOffer[];
|
|
16
|
+
fallbackTemplate?: ({
|
|
17
|
+
offer,
|
|
18
|
+
offerIndex,
|
|
19
|
+
showProductTypeLabel,
|
|
20
|
+
}: {
|
|
21
|
+
offer: BaseOffer;
|
|
22
|
+
offerIndex: number;
|
|
23
|
+
showProductTypeLabel?: boolean;
|
|
24
|
+
}) => React.ReactNode;
|
|
25
|
+
showBorder?: boolean;
|
|
26
|
+
showProductTypeLabel?: boolean;
|
|
27
|
+
// featureClient?: CnfFeatureClient; TODO: this is the like split on cnf side it uses growthbook
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const Offer = ({
|
|
31
|
+
productTypeBuilder,
|
|
32
|
+
offers,
|
|
33
|
+
showProductTypeLabel = true,
|
|
34
|
+
fallbackTemplate,
|
|
35
|
+
showBorder = true,
|
|
36
|
+
}: RenderOfferListProps) =>
|
|
37
|
+
offers.map((offer: BaseOffer, offerIndex: number) => {
|
|
38
|
+
const builder = productTypeBuilder.find(({ productTypes }) =>
|
|
39
|
+
productTypes.includes(offer.productType)
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
if (!builder && !fallbackTemplate) {
|
|
43
|
+
console.error(
|
|
44
|
+
`No builder or fallback template found for product type ${offer.productType},
|
|
45
|
+
please add it to the productTypeBuilder or inform a fallback template`
|
|
46
|
+
);
|
|
47
|
+
return <></>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<Fragment key={`${offerIndex}-${offer.uuid}`}>
|
|
52
|
+
{match(builder)
|
|
53
|
+
.with({ layout: "defaultOfferCard" }, (layout) => (
|
|
54
|
+
<DefaultOfferCard
|
|
55
|
+
offerIndex={offerIndex}
|
|
56
|
+
key={`${offerIndex}-${offer.uuid}`}
|
|
57
|
+
offer={offer}
|
|
58
|
+
productTypeBuilder={layout}
|
|
59
|
+
showBorder={showBorder}
|
|
60
|
+
showProductTypeLabel={showProductTypeLabel}
|
|
61
|
+
/>
|
|
62
|
+
))
|
|
63
|
+
.with({ layout: "creditCardOfferCard" }, (layout) => (
|
|
64
|
+
<CreditCardOfferCard
|
|
65
|
+
offerIndex={offerIndex}
|
|
66
|
+
key={`${offerIndex}-${offer.uuid}`}
|
|
67
|
+
offer={offer}
|
|
68
|
+
productTypeBuilder={layout}
|
|
69
|
+
showBorder={showBorder}
|
|
70
|
+
showProductTypeLabel={showProductTypeLabel}
|
|
71
|
+
/>
|
|
72
|
+
))
|
|
73
|
+
.with({ layout: "headlineWithDescriptionCard" }, (layout) => (
|
|
74
|
+
<HeadlineWithDescriptionCard
|
|
75
|
+
offerIndex={offerIndex}
|
|
76
|
+
key={`${offerIndex}-${offer.uuid}`}
|
|
77
|
+
offer={offer}
|
|
78
|
+
productTypeBuilder={layout}
|
|
79
|
+
showBorder={showBorder}
|
|
80
|
+
showProductTypeLabel={showProductTypeLabel}
|
|
81
|
+
/>
|
|
82
|
+
))
|
|
83
|
+
.with(undefined, () => {
|
|
84
|
+
if (!fallbackTemplate) {
|
|
85
|
+
return <></>;
|
|
86
|
+
}
|
|
87
|
+
const FallbackTemplate = fallbackTemplate;
|
|
88
|
+
return (
|
|
89
|
+
<FallbackTemplate
|
|
90
|
+
offerIndex={offerIndex}
|
|
91
|
+
key={`${offerIndex}-${offer.uuid}`}
|
|
92
|
+
offer={offer}
|
|
93
|
+
showProductTypeLabel={showProductTypeLabel}
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
})
|
|
97
|
+
.exhaustive()}
|
|
98
|
+
</Fragment>
|
|
99
|
+
);
|
|
100
|
+
});
|