@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,96 @@
|
|
|
1
|
+
import { get } from "radash";
|
|
2
|
+
import type { BaseOffer } from "../../../../capabilities/offer-catalog/src";
|
|
3
|
+
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
import type { CreditCardOfferCard as CreditCardOfferCardBuilderProps } from "../../../../builder";
|
|
7
|
+
import { makeCreditCardOfferStats } from "./statsBuilder";
|
|
8
|
+
import { BaseOfferCard, SeeMore } from "../../Common";
|
|
9
|
+
import Divider from "../../Divider";
|
|
10
|
+
import Text from "../../Text";
|
|
11
|
+
import { CallToAction } from "../../Common/DynamicOfferCard/CallToAction";
|
|
12
|
+
import { StyleSheet } from "react-native";
|
|
13
|
+
|
|
14
|
+
type CreditCardOfferCardProps = {
|
|
15
|
+
productTypeBuilder: CreditCardOfferCardBuilderProps;
|
|
16
|
+
offer: BaseOffer;
|
|
17
|
+
showBorder: boolean;
|
|
18
|
+
showProductTypeLabel?: boolean;
|
|
19
|
+
offerIndex: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const CreditCardOfferCard = ({
|
|
23
|
+
offer,
|
|
24
|
+
productTypeBuilder,
|
|
25
|
+
// showBorder, TODO: this is unused in the cnf-app as well
|
|
26
|
+
showProductTypeLabel,
|
|
27
|
+
offerIndex,
|
|
28
|
+
}: CreditCardOfferCardProps) => {
|
|
29
|
+
const { stats } = makeCreditCardOfferStats(productTypeBuilder)(offer);
|
|
30
|
+
const descriptionPoints = get(offer, "descriptionPoints", []);
|
|
31
|
+
const legalLanguage = get(offer, "legalLanguage", "");
|
|
32
|
+
const showMoreInfo = descriptionPoints.length > 0 || !!legalLanguage;
|
|
33
|
+
const badges = get(offer, "badges", []);
|
|
34
|
+
const showBadge = badges.length > 0;
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<BaseOfferCard showBorder={showBadge}>
|
|
38
|
+
{showProductTypeLabel && (
|
|
39
|
+
<BaseOfferCard.TopBar>
|
|
40
|
+
<BaseOfferCard.ProductType>
|
|
41
|
+
{offer.productDisplayName}
|
|
42
|
+
</BaseOfferCard.ProductType>
|
|
43
|
+
</BaseOfferCard.TopBar>
|
|
44
|
+
)}
|
|
45
|
+
<BaseOfferCard.Container>
|
|
46
|
+
<BaseOfferCard.CreditCardContainer>
|
|
47
|
+
{showBadge && <BaseOfferCard.Tip>{badges[0]}</BaseOfferCard.Tip>}
|
|
48
|
+
<BaseOfferCard.CreditCardImage
|
|
49
|
+
src={offer.financialInstitutionImageUrl}
|
|
50
|
+
// imageAttributes={{ title: offer.financialInstitutionDisplayName }}
|
|
51
|
+
alt={offer.financialInstitutionDisplayName}
|
|
52
|
+
/>
|
|
53
|
+
<Text variant="body-2" color="neutral" weight="bold">
|
|
54
|
+
{offer.financialInstitutionDisplayName}
|
|
55
|
+
</Text>
|
|
56
|
+
|
|
57
|
+
<BaseOfferCard.Content>
|
|
58
|
+
<Divider />
|
|
59
|
+
<BaseOfferCard.Stats>
|
|
60
|
+
{stats.map((stat) => (
|
|
61
|
+
<BaseOfferCard.Stat
|
|
62
|
+
key={stat.label}
|
|
63
|
+
label={stat.label}
|
|
64
|
+
content={stat.content}
|
|
65
|
+
isHighlighted={stat.isHighlighted}
|
|
66
|
+
isNull={stat.isNull}
|
|
67
|
+
/>
|
|
68
|
+
))}
|
|
69
|
+
{showMoreInfo && (
|
|
70
|
+
<SeeMore offer={offer} offerIndex={offerIndex} />
|
|
71
|
+
)}
|
|
72
|
+
</BaseOfferCard.Stats>
|
|
73
|
+
</BaseOfferCard.Content>
|
|
74
|
+
</BaseOfferCard.CreditCardContainer>
|
|
75
|
+
|
|
76
|
+
<BaseOfferCard.BottomBar>
|
|
77
|
+
<CallToAction
|
|
78
|
+
offer={offer}
|
|
79
|
+
overrideUrl={offer.overrideUrl}
|
|
80
|
+
style={styles.cta}
|
|
81
|
+
context="offer"
|
|
82
|
+
offerIndex={offerIndex}
|
|
83
|
+
>
|
|
84
|
+
Continue
|
|
85
|
+
</CallToAction>
|
|
86
|
+
{/* Move this back when we have mocked or api data ready */}
|
|
87
|
+
{/* <BaseOfferCard.ChosenBy>300</BaseOfferCard.ChosenBy> */}
|
|
88
|
+
</BaseOfferCard.BottomBar>
|
|
89
|
+
</BaseOfferCard.Container>
|
|
90
|
+
</BaseOfferCard>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const styles = StyleSheet.create({
|
|
95
|
+
cta: { marginTop: 20 },
|
|
96
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BaseOffer } from "../../../../capabilities/offer-catalog/src";
|
|
2
|
+
import type { CreditCardOfferCard } from "../../../../builder";
|
|
3
|
+
import { statsToElementPropsBuilder } from "../../../../capabilities/offer-catalog/src/utils/stats";
|
|
4
|
+
|
|
5
|
+
export const makeCreditCardOfferStats =
|
|
6
|
+
(productTypeBuilder: CreditCardOfferCard) => (offer: BaseOffer) => {
|
|
7
|
+
const stats = statsToElementPropsBuilder(productTypeBuilder.stats, offer);
|
|
8
|
+
|
|
9
|
+
return { stats };
|
|
10
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { get } from "radash";
|
|
2
|
+
|
|
3
|
+
import type { BaseOffer } from "../../../../capabilities/offer-catalog/src";
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
import { makeDefaultOfferCardStats } from "./statsBuilder";
|
|
7
|
+
import type { DefaultOfferCard as DefaultOfferCardBuilderProps } from "../../../../builder";
|
|
8
|
+
import { BaseOfferCard, DynamicOfferCard, SeeMore } from "../../Common";
|
|
9
|
+
|
|
10
|
+
type DefaultOfferCardProps = {
|
|
11
|
+
productTypeBuilder: DefaultOfferCardBuilderProps;
|
|
12
|
+
offer: BaseOffer;
|
|
13
|
+
offerIndex: number;
|
|
14
|
+
showBorder: boolean;
|
|
15
|
+
showProductTypeLabel?: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const DefaultOfferCard = ({
|
|
19
|
+
offer,
|
|
20
|
+
productTypeBuilder,
|
|
21
|
+
offerIndex,
|
|
22
|
+
showBorder,
|
|
23
|
+
showProductTypeLabel,
|
|
24
|
+
}: DefaultOfferCardProps) => {
|
|
25
|
+
const { stats, topStats } =
|
|
26
|
+
makeDefaultOfferCardStats(productTypeBuilder)(offer);
|
|
27
|
+
const descriptionPoints = get(offer, "descriptionPoints", []);
|
|
28
|
+
const description = get(offer, "description", "");
|
|
29
|
+
const legalInformation = get(offer, "legalInformation", "");
|
|
30
|
+
const legalLanguage = get(offer, "legalLanguage", "");
|
|
31
|
+
const showMoreInfo = descriptionPoints.length > 0 || !!legalLanguage;
|
|
32
|
+
|
|
33
|
+
const contentDescription = description || legalInformation;
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<DynamicOfferCard
|
|
37
|
+
key={`${offerIndex}-${offer.uuid}`}
|
|
38
|
+
offer={offer}
|
|
39
|
+
offerIndex={offerIndex}
|
|
40
|
+
showBorder={showBorder}
|
|
41
|
+
showProductTypeLabel={showProductTypeLabel}
|
|
42
|
+
>
|
|
43
|
+
<BaseOfferCard.TopContainer>
|
|
44
|
+
{topStats.map((stat) => (
|
|
45
|
+
<BaseOfferCard.Stat
|
|
46
|
+
key={`${offerIndex}-${stat.label}`}
|
|
47
|
+
label={stat.label}
|
|
48
|
+
content={stat.content}
|
|
49
|
+
isVertical
|
|
50
|
+
/>
|
|
51
|
+
))}
|
|
52
|
+
</BaseOfferCard.TopContainer>
|
|
53
|
+
|
|
54
|
+
<BaseOfferCard.Stats>
|
|
55
|
+
{stats.map((stat) => (
|
|
56
|
+
<BaseOfferCard.Stat
|
|
57
|
+
key={`${offerIndex}-${stat.label}`}
|
|
58
|
+
label={stat.label}
|
|
59
|
+
content={stat.content}
|
|
60
|
+
/>
|
|
61
|
+
))}
|
|
62
|
+
|
|
63
|
+
<BaseOfferCard.DescriptionHandler
|
|
64
|
+
descriptionPoints={descriptionPoints}
|
|
65
|
+
contentDescription={contentDescription}
|
|
66
|
+
/>
|
|
67
|
+
|
|
68
|
+
{showMoreInfo && <SeeMore offer={offer} offerIndex={offerIndex} />}
|
|
69
|
+
</BaseOfferCard.Stats>
|
|
70
|
+
</DynamicOfferCard>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BaseOffer } from "../../../../capabilities/offer-catalog/src";
|
|
2
|
+
import type { DefaultOfferCard } from "../../../../builder";
|
|
3
|
+
import { statsToElementPropsBuilder } from "../../../../capabilities/offer-catalog/src/utils/stats";
|
|
4
|
+
|
|
5
|
+
export const makeDefaultOfferCardStats =
|
|
6
|
+
(productTypeBuilder: DefaultOfferCard) => (offer: BaseOffer) => {
|
|
7
|
+
const stats = statsToElementPropsBuilder(productTypeBuilder.stats, offer);
|
|
8
|
+
const topStats = statsToElementPropsBuilder(
|
|
9
|
+
productTypeBuilder.topStats,
|
|
10
|
+
offer
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
return { stats, topStats };
|
|
14
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { get } from "radash";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { SeeMore } from "../../Common/DynamicOfferCard/SeeMore";
|
|
5
|
+
import type { BaseOffer } from "../../../../capabilities/offer-catalog/src";
|
|
6
|
+
import type { HeadlineWithDescriptionCard as HeadlineWithDescriptionCardBuilderProps } from "../../../../builder";
|
|
7
|
+
import { BaseOfferCard, DynamicOfferCard } from "../../Common";
|
|
8
|
+
|
|
9
|
+
type HeadlineWithDescriptionCardProps = {
|
|
10
|
+
productTypeBuilder: HeadlineWithDescriptionCardBuilderProps;
|
|
11
|
+
offer: BaseOffer;
|
|
12
|
+
offerIndex: number;
|
|
13
|
+
showBorder: boolean;
|
|
14
|
+
showProductTypeLabel?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export const HeadlineWithDescriptionCard = ({
|
|
17
|
+
offer,
|
|
18
|
+
productTypeBuilder,
|
|
19
|
+
offerIndex,
|
|
20
|
+
showBorder,
|
|
21
|
+
showProductTypeLabel,
|
|
22
|
+
}: HeadlineWithDescriptionCardProps) => {
|
|
23
|
+
const {
|
|
24
|
+
headlineField = "headline",
|
|
25
|
+
descriptionField = "description",
|
|
26
|
+
descriptionPointsField = "descriptionPoints",
|
|
27
|
+
} = productTypeBuilder;
|
|
28
|
+
|
|
29
|
+
const headline = get<string>(offer, headlineField, "");
|
|
30
|
+
const description = get<string>(offer, descriptionField, "");
|
|
31
|
+
const descriptionPoints = get<string[]>(offer, descriptionPointsField, []);
|
|
32
|
+
const legalInformation = get(offer, "legalInformation", "");
|
|
33
|
+
const legalLanguage = get(offer, "legalLanguage", "");
|
|
34
|
+
const showMoreInfo = descriptionPoints.length > 0 || !!legalLanguage;
|
|
35
|
+
|
|
36
|
+
const contentDescription = description || legalInformation;
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<DynamicOfferCard
|
|
40
|
+
key={`${offerIndex}-${offer.uuid}`}
|
|
41
|
+
offer={offer}
|
|
42
|
+
offerIndex={offerIndex}
|
|
43
|
+
showBorder={showBorder}
|
|
44
|
+
showProductTypeLabel={showProductTypeLabel}
|
|
45
|
+
>
|
|
46
|
+
<BaseOfferCard.TopContainer>
|
|
47
|
+
<BaseOfferCard.Headline>{headline}</BaseOfferCard.Headline>
|
|
48
|
+
</BaseOfferCard.TopContainer>
|
|
49
|
+
|
|
50
|
+
<BaseOfferCard.DescriptionHandler
|
|
51
|
+
descriptionPoints={descriptionPoints}
|
|
52
|
+
contentDescription={contentDescription}
|
|
53
|
+
hasDivider={false}
|
|
54
|
+
/>
|
|
55
|
+
|
|
56
|
+
{showMoreInfo && <SeeMore offer={offer} offerIndex={offerIndex} />}
|
|
57
|
+
</DynamicOfferCard>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { arrayToMarkdownList } from "../../../capabilities/offer-catalog/src/utils/arrayToMarkdownList";
|
|
3
|
+
import View from "../View";
|
|
4
|
+
import Text from "../Text";
|
|
5
|
+
import { MarkdownText } from "../../../capabilities/ui/elements/src/components/MarkdownText";
|
|
6
|
+
|
|
7
|
+
export function DescriptionPoints({
|
|
8
|
+
descriptionPoints,
|
|
9
|
+
}: {
|
|
10
|
+
descriptionPoints: string[];
|
|
11
|
+
}) {
|
|
12
|
+
return (
|
|
13
|
+
<View gap={8}>
|
|
14
|
+
<Text variant={"body-3"} weight={"bold"} color={"neutral"}>
|
|
15
|
+
Offer Details
|
|
16
|
+
</Text>
|
|
17
|
+
<MarkdownText
|
|
18
|
+
variant={"body-3"}
|
|
19
|
+
color={"neutral"}
|
|
20
|
+
content={arrayToMarkdownList(descriptionPoints)}
|
|
21
|
+
/>
|
|
22
|
+
</View>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MarkdownText } from "../../../capabilities/ui/elements/src/components/MarkdownText";
|
|
3
|
+
import Text from "../Text";
|
|
4
|
+
import View from "../View";
|
|
5
|
+
|
|
6
|
+
export function Disclaimer({ disclaimer }: { disclaimer: string }) {
|
|
7
|
+
return (
|
|
8
|
+
<View gap={16}>
|
|
9
|
+
<Text variant={"body-3"} weight={"bold"} color={"neutral"}>
|
|
10
|
+
Provider Disclaimer
|
|
11
|
+
</Text>
|
|
12
|
+
<MarkdownText variant={"body-3"} color={"neutral"} content={disclaimer} />
|
|
13
|
+
</View>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Modal,
|
|
4
|
+
View,
|
|
5
|
+
SafeAreaView,
|
|
6
|
+
ScrollView,
|
|
7
|
+
TouchableOpacity,
|
|
8
|
+
StyleSheet,
|
|
9
|
+
} from "react-native";
|
|
10
|
+
import Text from "../Text";
|
|
11
|
+
import type { BaseOffer } from "../../../capabilities/offer-catalog/src";
|
|
12
|
+
import { DescriptionPoints } from "./DescriptionPoints";
|
|
13
|
+
import { Disclaimer } from "./Disclaimer";
|
|
14
|
+
import { CallToAction } from "../Common/DynamicOfferCard/CallToAction";
|
|
15
|
+
import Divider from "../Divider";
|
|
16
|
+
|
|
17
|
+
type OfferDetailsModalProps = {
|
|
18
|
+
visible: boolean;
|
|
19
|
+
offer: BaseOffer;
|
|
20
|
+
offerIndex: number;
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const CTA_LABEL = "Continue";
|
|
25
|
+
|
|
26
|
+
export const OfferDetailsModal = ({
|
|
27
|
+
visible,
|
|
28
|
+
offer,
|
|
29
|
+
onClose,
|
|
30
|
+
offerIndex,
|
|
31
|
+
}: OfferDetailsModalProps) => {
|
|
32
|
+
return (
|
|
33
|
+
<Modal
|
|
34
|
+
animationType="slide"
|
|
35
|
+
transparent={false}
|
|
36
|
+
visible={visible}
|
|
37
|
+
onRequestClose={onClose}
|
|
38
|
+
>
|
|
39
|
+
<SafeAreaView style={styles.modalContainer}>
|
|
40
|
+
<View style={styles.modalHeader}>
|
|
41
|
+
<TouchableOpacity
|
|
42
|
+
onPress={onClose}
|
|
43
|
+
style={styles.closeXButton}
|
|
44
|
+
hitSlop={{ top: 15, right: 15, bottom: 15, left: 15 }}
|
|
45
|
+
>
|
|
46
|
+
<Text style={styles.closeXText}>✕</Text>
|
|
47
|
+
</TouchableOpacity>
|
|
48
|
+
</View>
|
|
49
|
+
|
|
50
|
+
<ScrollView
|
|
51
|
+
style={styles.modalContent}
|
|
52
|
+
contentContainerStyle={styles.scrollContent}
|
|
53
|
+
>
|
|
54
|
+
{offer?.descriptionPoints?.length && (
|
|
55
|
+
<DescriptionPoints descriptionPoints={offer?.descriptionPoints} />
|
|
56
|
+
)}
|
|
57
|
+
{offer?.descriptionPoints && offer?.legalLanguage && <Divider />}
|
|
58
|
+
{offer?.legalLanguage && (
|
|
59
|
+
<Disclaimer disclaimer={offer.legalLanguage} />
|
|
60
|
+
)}
|
|
61
|
+
</ScrollView>
|
|
62
|
+
<CallToAction
|
|
63
|
+
offerIndex={offerIndex}
|
|
64
|
+
offer={offer}
|
|
65
|
+
overrideUrl={offer.overrideUrl}
|
|
66
|
+
style={styles.cta}
|
|
67
|
+
context="offer_details"
|
|
68
|
+
>
|
|
69
|
+
{CTA_LABEL}
|
|
70
|
+
</CallToAction>
|
|
71
|
+
</SafeAreaView>
|
|
72
|
+
</Modal>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
modalContainer: {
|
|
78
|
+
flex: 1,
|
|
79
|
+
backgroundColor: "#ffffff",
|
|
80
|
+
},
|
|
81
|
+
modalHeader: {
|
|
82
|
+
flexDirection: "row",
|
|
83
|
+
paddingTop: 16,
|
|
84
|
+
paddingHorizontal: 16,
|
|
85
|
+
paddingBottom: 32,
|
|
86
|
+
borderBottomWidth: 1,
|
|
87
|
+
borderBottomColor: "#e0e0e0",
|
|
88
|
+
position: "relative",
|
|
89
|
+
},
|
|
90
|
+
closeXButton: {
|
|
91
|
+
position: "absolute",
|
|
92
|
+
left: 16,
|
|
93
|
+
top: 16,
|
|
94
|
+
zIndex: 10,
|
|
95
|
+
},
|
|
96
|
+
closeXText: {
|
|
97
|
+
fontSize: 20,
|
|
98
|
+
color: "#000000",
|
|
99
|
+
},
|
|
100
|
+
modalContent: {
|
|
101
|
+
flex: 1,
|
|
102
|
+
},
|
|
103
|
+
scrollContent: {
|
|
104
|
+
padding: 16,
|
|
105
|
+
paddingBottom: 64,
|
|
106
|
+
},
|
|
107
|
+
cta: {
|
|
108
|
+
marginHorizontal: 16,
|
|
109
|
+
marginBottom: 16,
|
|
110
|
+
},
|
|
111
|
+
});
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { localCnfContext } from "../../config/mocks/cnfContext";
|
|
3
|
+
import { Text } from "react-native";
|
|
4
|
+
import type { CnfContext } from "../../capabilities/core/src/system/cnfContext/CnfContext";
|
|
5
|
+
import { getPageData } from "../pageData";
|
|
6
|
+
import type { Layout } from "../utils";
|
|
7
|
+
import {
|
|
8
|
+
DynamicOffersContainer,
|
|
9
|
+
DynamicOfferSkeleton,
|
|
10
|
+
} from "./DynamicOffers/DynamicOffersContainer";
|
|
11
|
+
import type { DynamicOfferProps } from "./DynamicOffers/DynamicOffers";
|
|
12
|
+
import { ThemeProvider, type FontFamily } from "../context/ThemeProvider";
|
|
13
|
+
import {
|
|
14
|
+
EventHandlerProvider,
|
|
15
|
+
type EventHandlerContextType,
|
|
16
|
+
} from "../context/EventHandlerProvider";
|
|
17
|
+
import { getConfigApiBaseUrl } from "../apiEnvironment";
|
|
18
|
+
import { getDefaultPaletteColor } from "../utils/getDefaultPaletteColor";
|
|
19
|
+
|
|
20
|
+
export type MoneyLionOfferCarouselProps = {
|
|
21
|
+
channel: string;
|
|
22
|
+
zone: string;
|
|
23
|
+
subAccountToken: string;
|
|
24
|
+
searchAPIToken: string;
|
|
25
|
+
productType?: string;
|
|
26
|
+
query?: string;
|
|
27
|
+
tags?: string;
|
|
28
|
+
displayLayout?: Layout;
|
|
29
|
+
staticProductTypes?: string;
|
|
30
|
+
fontFamily?: Partial<FontFamily>;
|
|
31
|
+
showProductTypeLabel?: boolean;
|
|
32
|
+
isDev: boolean;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const getConfiguration = async ({
|
|
36
|
+
channel,
|
|
37
|
+
zone,
|
|
38
|
+
subAccountToken,
|
|
39
|
+
isDev,
|
|
40
|
+
}: Pick<
|
|
41
|
+
MoneyLionOfferCarouselProps,
|
|
42
|
+
"channel" | "zone" | "subAccountToken" | "isDev"
|
|
43
|
+
>) => {
|
|
44
|
+
const url = `${getConfigApiBaseUrl(isDev)}/network/${channel}/${zone}/api/configuration`;
|
|
45
|
+
|
|
46
|
+
const headers = {
|
|
47
|
+
Authorization: `Bearer ${subAccountToken}`,
|
|
48
|
+
};
|
|
49
|
+
try {
|
|
50
|
+
const response = await fetch(url, { headers });
|
|
51
|
+
if (!response.ok) {
|
|
52
|
+
throw new Error();
|
|
53
|
+
}
|
|
54
|
+
const data = await response.json();
|
|
55
|
+
|
|
56
|
+
return data;
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error("Error fetching configuration", error);
|
|
59
|
+
return localCnfContext;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const MoneyLionOfferCarousel = (
|
|
64
|
+
props: MoneyLionOfferCarouselProps &
|
|
65
|
+
Omit<EventHandlerContextType, "rateTableUuid" | "leadUuid">
|
|
66
|
+
) => {
|
|
67
|
+
const { channel, zone, subAccountToken, fontFamily, isDev } = props;
|
|
68
|
+
|
|
69
|
+
const {
|
|
70
|
+
onInitialize,
|
|
71
|
+
onRateTableSubmit,
|
|
72
|
+
onRateTableResponse,
|
|
73
|
+
onOfferDisplayInViewport,
|
|
74
|
+
onOfferClick,
|
|
75
|
+
onOfferDetailsPageOpen,
|
|
76
|
+
onOfferDetailsPageClose,
|
|
77
|
+
} = props;
|
|
78
|
+
|
|
79
|
+
const eventHandlers = {
|
|
80
|
+
onInitialize,
|
|
81
|
+
onRateTableSubmit,
|
|
82
|
+
onRateTableResponse,
|
|
83
|
+
onOfferDisplayInViewport,
|
|
84
|
+
onOfferClick,
|
|
85
|
+
onOfferDetailsPageOpen,
|
|
86
|
+
onOfferDetailsPageClose,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const [context, setContext] = useState<CnfContext | null>(null);
|
|
90
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
91
|
+
const [error, setError] = useState<Error | null>(null);
|
|
92
|
+
const [pageData, setPageData] = useState<any>(null);
|
|
93
|
+
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
const fetchConfiguration = async () => {
|
|
96
|
+
try {
|
|
97
|
+
setIsLoading(true);
|
|
98
|
+
const data = await getConfiguration({
|
|
99
|
+
channel,
|
|
100
|
+
zone,
|
|
101
|
+
subAccountToken,
|
|
102
|
+
isDev,
|
|
103
|
+
});
|
|
104
|
+
setContext({ ...(data.serializableContext as CnfContext), isDev });
|
|
105
|
+
} catch (err) {
|
|
106
|
+
setError(
|
|
107
|
+
err instanceof Error
|
|
108
|
+
? err
|
|
109
|
+
: new Error("Failed to fetch configuration")
|
|
110
|
+
);
|
|
111
|
+
} finally {
|
|
112
|
+
setIsLoading(false);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
fetchConfiguration();
|
|
117
|
+
}, [channel, zone, subAccountToken, isDev]);
|
|
118
|
+
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
if (isLoading) {
|
|
121
|
+
onInitialize?.({ timestamp: new Date().toISOString() });
|
|
122
|
+
}
|
|
123
|
+
}, [isLoading, onInitialize]);
|
|
124
|
+
|
|
125
|
+
useEffect(() => {
|
|
126
|
+
const fetchPageData = async () => {
|
|
127
|
+
if (context) {
|
|
128
|
+
const data = await getPageData({
|
|
129
|
+
context,
|
|
130
|
+
params: props,
|
|
131
|
+
onRateTableSubmit,
|
|
132
|
+
});
|
|
133
|
+
onRateTableResponse?.({
|
|
134
|
+
timestamp: new Date().toISOString(),
|
|
135
|
+
isError: Boolean(data.isError),
|
|
136
|
+
offers: data.offers,
|
|
137
|
+
rateTableUuid: data.rateTableUuid,
|
|
138
|
+
leadUuid: data.leadUuid,
|
|
139
|
+
});
|
|
140
|
+
setPageData(data);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
fetchPageData();
|
|
145
|
+
}, [context, onRateTableResponse, onRateTableSubmit, props]);
|
|
146
|
+
|
|
147
|
+
if (isLoading) {
|
|
148
|
+
return <DynamicOfferSkeleton displayLayout={"fixed"} />;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (error) {
|
|
152
|
+
return <Text>{`Error: ${error.message}`}</Text>; // Replace with your error component
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (!context) {
|
|
156
|
+
return <Text>{"Context is null"}</Text>; // Replace with your error component
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (!pageData) {
|
|
160
|
+
return <DynamicOfferSkeleton displayLayout={"fixed"} />;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const {
|
|
164
|
+
shouldHideFooter,
|
|
165
|
+
displayLayout,
|
|
166
|
+
showProductTypeLabel,
|
|
167
|
+
showBorder,
|
|
168
|
+
title,
|
|
169
|
+
offers,
|
|
170
|
+
rateTableUuid,
|
|
171
|
+
leadUuid,
|
|
172
|
+
} = pageData;
|
|
173
|
+
|
|
174
|
+
const config: DynamicOfferProps = {
|
|
175
|
+
offers,
|
|
176
|
+
shouldHideFooter,
|
|
177
|
+
displayLayout,
|
|
178
|
+
showProductTypeLabel,
|
|
179
|
+
showBorder,
|
|
180
|
+
title,
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const palette = {
|
|
184
|
+
...context.brand.palette,
|
|
185
|
+
positive:
|
|
186
|
+
context.brand.palette?.positive ?? getDefaultPaletteColor("positive"),
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
return (
|
|
190
|
+
<ThemeProvider palette={palette} fontFamily={fontFamily}>
|
|
191
|
+
<EventHandlerProvider
|
|
192
|
+
eventHandlers={{
|
|
193
|
+
...eventHandlers,
|
|
194
|
+
rateTableUuid,
|
|
195
|
+
leadUuid,
|
|
196
|
+
}}
|
|
197
|
+
>
|
|
198
|
+
<DynamicOffersContainer config={config} />
|
|
199
|
+
</EventHandlerProvider>
|
|
200
|
+
</ThemeProvider>
|
|
201
|
+
);
|
|
202
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
|
+
import { StyleSheet, Animated } from "react-native";
|
|
3
|
+
|
|
4
|
+
type BorderRadius = "small" | "medium" | "large" | "circular";
|
|
5
|
+
|
|
6
|
+
interface SkeletonProps {
|
|
7
|
+
width?: number | string;
|
|
8
|
+
height?: number | string;
|
|
9
|
+
borderRadius?: BorderRadius;
|
|
10
|
+
style?: any;
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const Skeleton = (props: SkeletonProps) => {
|
|
15
|
+
const {
|
|
16
|
+
width = "100%",
|
|
17
|
+
height = 20,
|
|
18
|
+
borderRadius = "small",
|
|
19
|
+
style = {},
|
|
20
|
+
backgroundColor = "#E1E9EE",
|
|
21
|
+
} = props;
|
|
22
|
+
|
|
23
|
+
const opacityValue = useRef(new Animated.Value(1)).current;
|
|
24
|
+
|
|
25
|
+
const getBorderRadius = (): number => {
|
|
26
|
+
switch (borderRadius) {
|
|
27
|
+
case "small":
|
|
28
|
+
return 4;
|
|
29
|
+
case "medium":
|
|
30
|
+
return 8;
|
|
31
|
+
case "large":
|
|
32
|
+
return 16;
|
|
33
|
+
case "circular":
|
|
34
|
+
return 9999;
|
|
35
|
+
default:
|
|
36
|
+
return 4;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
const animation = Animated.loop(
|
|
42
|
+
Animated.sequence([
|
|
43
|
+
Animated.timing(opacityValue, {
|
|
44
|
+
toValue: 0.6,
|
|
45
|
+
duration: 1200,
|
|
46
|
+
useNativeDriver: true,
|
|
47
|
+
}),
|
|
48
|
+
Animated.timing(opacityValue, {
|
|
49
|
+
toValue: 1,
|
|
50
|
+
duration: 1200,
|
|
51
|
+
useNativeDriver: true,
|
|
52
|
+
}),
|
|
53
|
+
])
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
animation.start();
|
|
57
|
+
|
|
58
|
+
return () => {
|
|
59
|
+
animation.stop();
|
|
60
|
+
};
|
|
61
|
+
}, [opacityValue]);
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<Animated.View
|
|
65
|
+
style={[
|
|
66
|
+
styles.skeleton,
|
|
67
|
+
{
|
|
68
|
+
width,
|
|
69
|
+
height,
|
|
70
|
+
borderRadius: getBorderRadius(),
|
|
71
|
+
backgroundColor,
|
|
72
|
+
opacity: opacityValue,
|
|
73
|
+
},
|
|
74
|
+
style,
|
|
75
|
+
]}
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const styles = StyleSheet.create({
|
|
81
|
+
skeleton: {
|
|
82
|
+
minHeight: 20,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export default Skeleton;
|