@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,140 @@
|
|
|
1
|
+
import React, { forwardRef, type ReactNode } from "react";
|
|
2
|
+
import {
|
|
3
|
+
TouchableOpacity,
|
|
4
|
+
View,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
ActivityIndicator,
|
|
7
|
+
type StyleProp,
|
|
8
|
+
type ViewStyle,
|
|
9
|
+
type TouchableOpacityProps,
|
|
10
|
+
} from "react-native";
|
|
11
|
+
import { useTheme, type ThemePalette } from "../../context/ThemeProvider";
|
|
12
|
+
import Text from "../Text";
|
|
13
|
+
|
|
14
|
+
// Helper function to determine text color based on background color
|
|
15
|
+
const getContrastColor = (hexColor: string): string => {
|
|
16
|
+
// Remove the hash if it exists
|
|
17
|
+
const color = hexColor.replace("#", "");
|
|
18
|
+
|
|
19
|
+
// Convert to RGB
|
|
20
|
+
const r = parseInt(color.substring(0, 2), 16) || 0;
|
|
21
|
+
const g = parseInt(color.substring(2, 4), 16) || 0;
|
|
22
|
+
const b = parseInt(color.substring(4, 6), 16) || 0;
|
|
23
|
+
|
|
24
|
+
// Calculate luminance using the perceived brightness formula
|
|
25
|
+
// (0.299*R + 0.587*G + 0.114*B)
|
|
26
|
+
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
27
|
+
|
|
28
|
+
// Return white for dark backgrounds, black for light backgrounds
|
|
29
|
+
return luminance > 0.5 ? "#000000" : "#FFFFFF";
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type Colors = keyof Omit<ThemePalette, "generation" | "colorScheme">;
|
|
33
|
+
|
|
34
|
+
export interface ButtonProps extends TouchableOpacityProps {
|
|
35
|
+
color?: Colors;
|
|
36
|
+
loading?: boolean;
|
|
37
|
+
highlighted?: boolean;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
children?: ReactNode;
|
|
40
|
+
style?: StyleProp<ViewStyle>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const Button = forwardRef<TouchableOpacity, ButtonProps>((props, ref) => {
|
|
44
|
+
const {
|
|
45
|
+
color = "neutral",
|
|
46
|
+
highlighted = false,
|
|
47
|
+
loading = false,
|
|
48
|
+
disabled = false,
|
|
49
|
+
children,
|
|
50
|
+
onPress,
|
|
51
|
+
style,
|
|
52
|
+
...rest
|
|
53
|
+
} = props;
|
|
54
|
+
|
|
55
|
+
const themeContext = useTheme();
|
|
56
|
+
|
|
57
|
+
const theme = themeContext?.theme || {};
|
|
58
|
+
|
|
59
|
+
// Convert palette colors to actual styles
|
|
60
|
+
const getPaletteColor = (colorKey: Colors) => {
|
|
61
|
+
switch (colorKey) {
|
|
62
|
+
case "promotional":
|
|
63
|
+
return theme.promotional || "#007AFF"; // TODO: remove fallback color
|
|
64
|
+
case "positive":
|
|
65
|
+
return theme.positive;
|
|
66
|
+
case "critical":
|
|
67
|
+
return theme.critical || "#FF3B30"; // TODO: remove fallback color
|
|
68
|
+
case "highlight":
|
|
69
|
+
return theme.highlight || "#FF9500"; // TODO: remove fallback color
|
|
70
|
+
case "neutral":
|
|
71
|
+
return theme.neutral || "#8E8E93"; // TODO: remove fallback color
|
|
72
|
+
default:
|
|
73
|
+
return "#8E8E93";
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const backgroundColor = getPaletteColor(color);
|
|
78
|
+
const textColor = getContrastColor(backgroundColor);
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<TouchableOpacity
|
|
82
|
+
ref={ref}
|
|
83
|
+
style={[
|
|
84
|
+
styles.container,
|
|
85
|
+
{ backgroundColor },
|
|
86
|
+
highlighted && { opacity: 0.8 },
|
|
87
|
+
style,
|
|
88
|
+
]}
|
|
89
|
+
onPress={onPress}
|
|
90
|
+
disabled={disabled || loading}
|
|
91
|
+
activeOpacity={0.7}
|
|
92
|
+
{...rest}
|
|
93
|
+
>
|
|
94
|
+
{loading && (
|
|
95
|
+
<View style={styles.loaderContainer}>
|
|
96
|
+
<ActivityIndicator size="small" color={textColor} />
|
|
97
|
+
</View>
|
|
98
|
+
)}
|
|
99
|
+
|
|
100
|
+
{children && (
|
|
101
|
+
<Text
|
|
102
|
+
variant={"body-2"}
|
|
103
|
+
weight={"medium"}
|
|
104
|
+
style={[loading && styles.hiddenChildren, { color: textColor }]}
|
|
105
|
+
numberOfLines={1}
|
|
106
|
+
>
|
|
107
|
+
{children}
|
|
108
|
+
</Text>
|
|
109
|
+
)}
|
|
110
|
+
</TouchableOpacity>
|
|
111
|
+
);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const styles = StyleSheet.create({
|
|
115
|
+
container: {
|
|
116
|
+
height: 48,
|
|
117
|
+
paddingHorizontal: 20,
|
|
118
|
+
alignItems: "center",
|
|
119
|
+
justifyContent: "center",
|
|
120
|
+
borderRadius: 24,
|
|
121
|
+
},
|
|
122
|
+
buttonGroup: {
|
|
123
|
+
flexDirection: "row",
|
|
124
|
+
alignItems: "center",
|
|
125
|
+
},
|
|
126
|
+
loaderContainer: {
|
|
127
|
+
position: "absolute",
|
|
128
|
+
top: 0,
|
|
129
|
+
left: 0,
|
|
130
|
+
right: 0,
|
|
131
|
+
bottom: 0,
|
|
132
|
+
justifyContent: "center",
|
|
133
|
+
alignItems: "center",
|
|
134
|
+
},
|
|
135
|
+
hiddenChildren: {
|
|
136
|
+
opacity: 0,
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
export default Button;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
import { Actionable, Tooltip, View } from "reshaped";
|
|
5
|
+
// TODO: import VideoPlayer from "../../VideoPlayer/VideoPlayer";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import Text from "../../Text";
|
|
8
|
+
|
|
9
|
+
type Video = {
|
|
10
|
+
muxId: string;
|
|
11
|
+
subtitle: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type VideoContentProps = Video;
|
|
15
|
+
|
|
16
|
+
export const VideoContent = memo(({ muxId, subtitle }: VideoContentProps) => (
|
|
17
|
+
<View gap={2} direction="column" width={27}>
|
|
18
|
+
<View width={27} height={48} borderRadius="large">
|
|
19
|
+
{/* TODO: Add the video player logic */}
|
|
20
|
+
<View key={`${muxId}`} />
|
|
21
|
+
{/* <VideoPlayer playbackId={muxId} /> */}
|
|
22
|
+
</View>
|
|
23
|
+
<Tooltip text={subtitle}>
|
|
24
|
+
{(attributes) => (
|
|
25
|
+
<Actionable attributes={attributes} as="div">
|
|
26
|
+
<Text
|
|
27
|
+
variant="caption-2"
|
|
28
|
+
weight="medium"
|
|
29
|
+
color="neutral-faded"
|
|
30
|
+
numberOfLines={2}
|
|
31
|
+
>
|
|
32
|
+
{subtitle}
|
|
33
|
+
</Text>
|
|
34
|
+
</Actionable>
|
|
35
|
+
)}
|
|
36
|
+
</Tooltip>
|
|
37
|
+
</View>
|
|
38
|
+
));
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// import { memo } from "react";
|
|
2
|
+
// import { VideoContent, type VideoContentProps } from "./VideoContent";
|
|
3
|
+
// import { GenericOfferVertical } from "../../../../capabilities/ui/elements/src";
|
|
4
|
+
// import React from "react";
|
|
5
|
+
// import Text from "../../Text";
|
|
6
|
+
// import { View, StyleSheet } from "react-native";
|
|
7
|
+
|
|
8
|
+
// type VideosContent = {
|
|
9
|
+
// title: string;
|
|
10
|
+
// subtitle: string;
|
|
11
|
+
// videos: VideoContentProps[];
|
|
12
|
+
// };
|
|
13
|
+
|
|
14
|
+
// export type VideosCardProps = {
|
|
15
|
+
// videosContent: VideosContent;
|
|
16
|
+
// showBorder: boolean;
|
|
17
|
+
// };
|
|
18
|
+
|
|
19
|
+
// export const VideosCard = memo(
|
|
20
|
+
// ({
|
|
21
|
+
// videosContent: { title, subtitle, videos },
|
|
22
|
+
// showBorder,
|
|
23
|
+
// }: VideosCardProps) => {
|
|
24
|
+
// const renderVideos = () =>
|
|
25
|
+
// videos.map((video) => <VideoContent key={video.muxId} {...video} />);
|
|
26
|
+
|
|
27
|
+
// return (
|
|
28
|
+
// <GenericOfferVertical showBorder={showBorder}>
|
|
29
|
+
// <GenericOfferVertical.Container>
|
|
30
|
+
// <View style={styles.textContainer}>
|
|
31
|
+
// <Text variant="featured-2" weight="bold">
|
|
32
|
+
// {title}
|
|
33
|
+
// </Text>
|
|
34
|
+
// <Text variant="body-3" weight="regular">
|
|
35
|
+
// {subtitle}
|
|
36
|
+
// </Text>
|
|
37
|
+
// </View>
|
|
38
|
+
// <View style={styles.videoContainer}>{renderVideos()}</View>
|
|
39
|
+
// </GenericOfferVertical.Container>
|
|
40
|
+
// </GenericOfferVertical>
|
|
41
|
+
// );
|
|
42
|
+
// }
|
|
43
|
+
// );
|
|
44
|
+
|
|
45
|
+
// const styles = StyleSheet.create({
|
|
46
|
+
// textContainer: {
|
|
47
|
+
// gap: 1,
|
|
48
|
+
// },
|
|
49
|
+
// videoContainer: {
|
|
50
|
+
// flexDirection: "row",
|
|
51
|
+
// gap: 3,
|
|
52
|
+
// justifyContent: "space-between",
|
|
53
|
+
// },
|
|
54
|
+
// });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// export * from "./VideosCard/VideosCard";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Content";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MarkdownText } from "../../../../../capabilities/ui/elements/src/components/MarkdownText";
|
|
3
|
+
import type { StatProps } from "../../../../../capabilities/offers/ux/src/elements/Stat";
|
|
4
|
+
import Text from "../../../Text";
|
|
5
|
+
import { StyleSheet, View } from "react-native";
|
|
6
|
+
|
|
7
|
+
// Custom function to capitalize first letter but preserve other capitalization
|
|
8
|
+
function smartCapitalize(text: string): string {
|
|
9
|
+
// For other words, capitalize first letter of each word
|
|
10
|
+
return text
|
|
11
|
+
.split(" ")
|
|
12
|
+
.map((word) => {
|
|
13
|
+
if (word.length === 0) return word;
|
|
14
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
15
|
+
})
|
|
16
|
+
.join(" ");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const VerticalStat = (props: StatProps) => {
|
|
20
|
+
return (
|
|
21
|
+
<View style={styles.verticalStatContainer}>
|
|
22
|
+
<Text variant="featured-2" color="neutral" weight={"bold"}>
|
|
23
|
+
{String(props.content).trim()}
|
|
24
|
+
</Text>
|
|
25
|
+
<MarkdownText
|
|
26
|
+
variant={"body-3"}
|
|
27
|
+
weight={"regular"}
|
|
28
|
+
color={"neutral-faded"}
|
|
29
|
+
content={props.label.trim()}
|
|
30
|
+
/>
|
|
31
|
+
</View>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const Stat = ({
|
|
36
|
+
content,
|
|
37
|
+
label,
|
|
38
|
+
isVertical,
|
|
39
|
+
isHighlighted,
|
|
40
|
+
isNull,
|
|
41
|
+
}: StatProps & {
|
|
42
|
+
isVertical?: boolean;
|
|
43
|
+
isHighlighted?: boolean;
|
|
44
|
+
isNull?: boolean;
|
|
45
|
+
}) => {
|
|
46
|
+
// Handle container layout change
|
|
47
|
+
|
|
48
|
+
if (isNull) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (isVertical) {
|
|
53
|
+
return <VerticalStat content={content} label={label} />;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<View
|
|
58
|
+
style={[
|
|
59
|
+
styles.horizontalStatContainer,
|
|
60
|
+
isHighlighted ? styles.highlightedContainer : null,
|
|
61
|
+
]}
|
|
62
|
+
>
|
|
63
|
+
<MarkdownText
|
|
64
|
+
variant={"body-3"}
|
|
65
|
+
color={"neutral-faded"}
|
|
66
|
+
content={label.trim()}
|
|
67
|
+
/>
|
|
68
|
+
<Text variant="body-3" color="neutral" weight="bold">
|
|
69
|
+
{smartCapitalize(String(content).trim())}
|
|
70
|
+
</Text>
|
|
71
|
+
</View>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const styles = StyleSheet.create({
|
|
76
|
+
verticalStatContainer: {
|
|
77
|
+
gap: 4,
|
|
78
|
+
flexDirection: "column",
|
|
79
|
+
},
|
|
80
|
+
horizontalStatContainer: {
|
|
81
|
+
gap: 1,
|
|
82
|
+
flexDirection: "row",
|
|
83
|
+
justifyContent: "space-between",
|
|
84
|
+
flexWrap: "wrap",
|
|
85
|
+
},
|
|
86
|
+
highlightedContainer: {
|
|
87
|
+
padding: 8,
|
|
88
|
+
backgroundColor: "#f4f4f4", // Light gray equivalent to neutral-faded
|
|
89
|
+
borderRadius: 8, // medium border radius
|
|
90
|
+
},
|
|
91
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Stat"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./StatsContainer";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export const ThumbsUpIcon = () => (
|
|
4
|
+
<svg
|
|
5
|
+
width="13"
|
|
6
|
+
height="12"
|
|
7
|
+
viewBox="0 0 13 12"
|
|
8
|
+
fill="none"
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
>
|
|
11
|
+
<path
|
|
12
|
+
d="M12.8349 4.99359L12.0782 7.71044C11.9052 8.33122 11.4165 8.8054 10.8156 8.97501C10.5694 9.04451 10.3256 8.85546 10.3256 8.5996C10.3256 8.42574 10.4407 8.27334 10.6081 8.22597C10.9522 8.12787 11.2329 7.85591 11.3314 7.50307L12.0885 4.78622C12.1765 4.47516 12.109 4.13304 11.9122 3.87382C11.7151 3.61438 11.404 3.46421 11.0825 3.46421H7.93031C7.82148 3.46421 7.71779 3.41751 7.64517 3.33461C7.57254 3.2517 7.53634 3.14265 7.54662 3.03383L7.68137 1.63406C7.71266 1.32814 7.52093 1.043 7.22528 0.949597C7.14238 0.923675 7.07489 0.954737 7.04897 1.01708L6.5987 2.14802C6.51937 2.34713 6.31937 2.47718 6.10641 2.45484C5.94596 2.43808 5.84541 2.34042 5.813 2.15071C5.79021 2.01707 5.81122 1.87965 5.86641 1.75607L6.33345 0.711163C6.52004 0.291278 6.99177 0.0734024 7.42752 0.208373C8.09612 0.410383 8.51622 1.043 8.44874 1.71697L8.37388 2.49551C8.36405 2.59808 8.44449 2.68657 8.54729 2.68657H11.0773C11.6425 2.68657 12.1868 2.95606 12.5292 3.40723C12.8713 3.85818 12.9855 4.44924 12.8349 4.99359Z"
|
|
13
|
+
fill="black"
|
|
14
|
+
fillOpacity="0.6"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M9.76404 5.48096C9.42192 5.03001 8.87756 4.76029 8.31243 4.76029H5.59066L5.68384 3.79092C5.71982 3.4307 5.61681 3.08254 5.41077 2.80523C5.23133 2.56389 4.97391 2.37618 4.6624 2.2821C4.22687 2.14735 3.75514 2.36501 3.56833 2.78511L2.43292 5.36185H1.00723C0.509358 5.36185 0.0999756 5.77146 0.0999756 6.26911V9.28115C0.0999756 9.77903 0.509358 10.1889 1.00723 10.1889H2.56275L3.0966 10.5725C3.59447 10.9303 4.18039 11.1167 4.79201 11.1167H7.5607C8.37477 11.1167 9.09544 10.5674 9.31309 9.78439L10.07 7.06776C10.2203 6.52341 10.1064 5.93191 9.76404 5.48096ZM9.32337 6.86017L8.5665 9.57679C8.44204 10.0228 8.02751 10.339 7.5607 10.339H4.79201C4.34084 10.339 3.91045 10.1991 3.54777 9.93992L2.91515 9.48361C2.84766 9.43691 2.7699 9.41098 2.687 9.41098H1.00723C0.934606 9.41098 0.877623 9.354 0.877623 9.28138V6.26933C0.877623 6.19671 0.934606 6.13973 1.00723 6.13973V6.13459H2.687C2.75046 6.13459 2.81124 6.11917 2.86509 6.09101C2.94353 6.05056 3.00789 5.98397 3.04476 5.90107L4.28385 3.09103C4.30978 3.02891 4.37704 2.99785 4.46017 3.02377C4.60877 3.0707 4.731 3.16612 4.8119 3.28813C4.89257 3.40902 4.93212 3.55583 4.91648 3.70801L4.78173 5.10778C4.77122 5.21683 4.80743 5.32565 4.88027 5.40878C4.9196 5.4537 4.9681 5.48811 5.02195 5.51001C5.06687 5.52878 5.11558 5.53839 5.16564 5.53839H8.31757C8.63913 5.53839 8.95019 5.68856 9.14728 5.94777C9.34415 6.20699 9.41141 6.54888 9.32337 6.86017Z"
|
|
18
|
+
fill="black"
|
|
19
|
+
fillOpacity="0.6"
|
|
20
|
+
/>
|
|
21
|
+
<path
|
|
22
|
+
d="M3.03448 6.92743V8.52965C3.03448 8.74216 2.85817 8.91848 2.64565 8.91848C2.43314 8.91848 2.25661 8.74216 2.25661 8.52965V6.92743C2.25661 6.71492 2.43314 6.53861 2.64565 6.53861C2.72677 6.53861 2.80253 6.5643 2.86509 6.60788C2.96699 6.67849 3.03448 6.79603 3.03448 6.92743Z"
|
|
23
|
+
fill="black"
|
|
24
|
+
fillOpacity="0.6"
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
);
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import React, { type ComponentProps } from "react";
|
|
2
|
+
|
|
3
|
+
import { ThumborImage } from "../../../../capabilities/ui/elements/src";
|
|
4
|
+
// import { ThumbsUpIcon } from "./ThumbsUpIcon";
|
|
5
|
+
import { MarkdownText } from "../../../../capabilities/ui/elements/src/components/MarkdownText";
|
|
6
|
+
import { arrayToMarkdownList } from "../../../../capabilities/offer-catalog/src";
|
|
7
|
+
import { StatsContainer } from "./StatsContainer";
|
|
8
|
+
import { Content } from "./Content";
|
|
9
|
+
import { Stat } from "./Stat";
|
|
10
|
+
import Button from "../../Button";
|
|
11
|
+
import Divider from "../../Divider";
|
|
12
|
+
import Text, { type TextProps } from "../../Text";
|
|
13
|
+
import View, { type ViewProps } from "../../View";
|
|
14
|
+
import { StyleSheet } from "react-native";
|
|
15
|
+
|
|
16
|
+
const CardWidth = 282;
|
|
17
|
+
|
|
18
|
+
const BaseOfferCard = ({
|
|
19
|
+
children,
|
|
20
|
+
showBorder = true,
|
|
21
|
+
...rest
|
|
22
|
+
}: ViewProps & { showBorder: boolean }) => (
|
|
23
|
+
<View
|
|
24
|
+
borderColor={showBorder ? "neutral" : undefined}
|
|
25
|
+
direction={"column"}
|
|
26
|
+
backgroundColor={"white"}
|
|
27
|
+
width={CardWidth}
|
|
28
|
+
gap={1}
|
|
29
|
+
style={styles.baseOfferCard}
|
|
30
|
+
{...rest}
|
|
31
|
+
>
|
|
32
|
+
{children}
|
|
33
|
+
</View>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const Container = ({ children, ...rest }: ViewProps) => (
|
|
37
|
+
<View
|
|
38
|
+
// height={"100%"}
|
|
39
|
+
maxHeight={"100%"}
|
|
40
|
+
// minHeight={100}
|
|
41
|
+
style={styles.container}
|
|
42
|
+
{...rest}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
</View>
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
const Tip = ({ children }: ViewProps) => (
|
|
49
|
+
<Text variant="caption-2" color="positive" weight="bold" style={styles.tip}>
|
|
50
|
+
{children}
|
|
51
|
+
</Text>
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const CreditCardImage = (
|
|
55
|
+
props: Omit<ComponentProps<typeof ThumborImage>, "width" | "height">
|
|
56
|
+
) => {
|
|
57
|
+
const calculatedWidth = CardWidth - 50;
|
|
58
|
+
const cardImageAspectRatio = 230 / 145;
|
|
59
|
+
const calculatedHeight = calculatedWidth / cardImageAspectRatio;
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<ThumborImage
|
|
63
|
+
width={calculatedWidth}
|
|
64
|
+
height={calculatedHeight}
|
|
65
|
+
resizeMode={"contain"}
|
|
66
|
+
{...props}
|
|
67
|
+
/>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const CreditCardContainer = ({ children, ...rest }: ViewProps) => (
|
|
72
|
+
<View
|
|
73
|
+
width={"100%"}
|
|
74
|
+
direction={"column"}
|
|
75
|
+
gap={16}
|
|
76
|
+
style={styles.creditCardContainer}
|
|
77
|
+
{...rest}
|
|
78
|
+
>
|
|
79
|
+
{children}
|
|
80
|
+
</View>
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
const PartnerContainer = ({ children, ...rest }: ViewProps) => (
|
|
84
|
+
<View
|
|
85
|
+
width={"100%"}
|
|
86
|
+
direction={"column"}
|
|
87
|
+
gap={3}
|
|
88
|
+
{...rest}
|
|
89
|
+
style={styles.partnerContainer}
|
|
90
|
+
>
|
|
91
|
+
{children}
|
|
92
|
+
</View>
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
const PartnerImage = (
|
|
96
|
+
props: Omit<ComponentProps<typeof ThumborImage>, "width" | "height">
|
|
97
|
+
) => {
|
|
98
|
+
// In the parent component that uses ThumborImage
|
|
99
|
+
// -32 is to account for the left + right margin of the image
|
|
100
|
+
const calculatedWidth = CardWidth - 32;
|
|
101
|
+
return (
|
|
102
|
+
<ThumborImage
|
|
103
|
+
width={calculatedWidth}
|
|
104
|
+
resizeMode={"contain"}
|
|
105
|
+
height={32}
|
|
106
|
+
{...props}
|
|
107
|
+
/>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const TopContainer = ({ children, ...viewProps }: ViewProps) => (
|
|
112
|
+
<View {...viewProps} gap={3} direction={"column"}>
|
|
113
|
+
{children}
|
|
114
|
+
|
|
115
|
+
<Divider />
|
|
116
|
+
</View>
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
const TopBar = ({ children, ...viewProps }: ViewProps) => (
|
|
120
|
+
<View
|
|
121
|
+
direction={"row"}
|
|
122
|
+
backgroundColor="primary-faded"
|
|
123
|
+
{...viewProps}
|
|
124
|
+
style={styles.topBar}
|
|
125
|
+
>
|
|
126
|
+
{children}
|
|
127
|
+
</View>
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
const ProductType = ({ children, ...rest }: TextProps) => (
|
|
131
|
+
<Text weight={"bold"} variant={"caption-1"} color="primary" {...rest}>
|
|
132
|
+
{children}
|
|
133
|
+
</Text>
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
const ChosenBy = ({ children, ...rest }: ViewProps) => (
|
|
137
|
+
<View width={"100%"} style={styles.chosenBy} {...rest}>
|
|
138
|
+
<View direction={"row"} style={{ alignItems: "center" }}>
|
|
139
|
+
{/* TODO Check this Icon Usage and move to reeact native version of same. */}
|
|
140
|
+
{/* <Icon svg={ThumbsUpIcon} attributes={{ style: { marginRight: "4px" } }} /> */}
|
|
141
|
+
<Text variant="caption-1" weight="bold">
|
|
142
|
+
Chosen by {children}
|
|
143
|
+
</Text>
|
|
144
|
+
</View>
|
|
145
|
+
</View>
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
const BottomBar = ({ children, ...viewProps }: ViewProps) => (
|
|
149
|
+
<View gap={5} {...viewProps} style={styles.bottomBar}>
|
|
150
|
+
{children}
|
|
151
|
+
</View>
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
const Headline = ({ children, ...rest }: TextProps) => (
|
|
155
|
+
<Text
|
|
156
|
+
variant="body-2"
|
|
157
|
+
color="neutral"
|
|
158
|
+
weight="bold"
|
|
159
|
+
numberOfLines={2}
|
|
160
|
+
{...rest}
|
|
161
|
+
>
|
|
162
|
+
{children}
|
|
163
|
+
</Text>
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
const Description = ({ children, ...rest }: TextProps) => (
|
|
167
|
+
<Text variant="body-3" color="neutral-faded" numberOfLines={4} {...rest}>
|
|
168
|
+
{children}
|
|
169
|
+
</Text>
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
const DescriptionPoints = ({
|
|
173
|
+
descriptionPoints,
|
|
174
|
+
...rest
|
|
175
|
+
}: TextProps & { descriptionPoints: string[] }) =>
|
|
176
|
+
descriptionPoints.length > 0 && (
|
|
177
|
+
<MarkdownText
|
|
178
|
+
content={arrayToMarkdownList(descriptionPoints)}
|
|
179
|
+
color="neutral-faded"
|
|
180
|
+
variant="body-3"
|
|
181
|
+
{...rest}
|
|
182
|
+
/>
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
const DescriptionHandler = ({
|
|
186
|
+
descriptionPoints,
|
|
187
|
+
contentDescription,
|
|
188
|
+
hasDivider = true,
|
|
189
|
+
}: {
|
|
190
|
+
descriptionPoints: string[];
|
|
191
|
+
contentDescription?: string;
|
|
192
|
+
hasDivider?: boolean;
|
|
193
|
+
}) => {
|
|
194
|
+
const renderContentDescription = () => {
|
|
195
|
+
if (descriptionPoints.length > 0) {
|
|
196
|
+
return (
|
|
197
|
+
<DescriptionPoints
|
|
198
|
+
numberOfLines={4}
|
|
199
|
+
color={"neutral-faded"}
|
|
200
|
+
variant={"body-3"}
|
|
201
|
+
descriptionPoints={descriptionPoints}
|
|
202
|
+
/>
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (contentDescription) {
|
|
207
|
+
return (
|
|
208
|
+
<Description variant={"body-3"} color={"neutral-faded"}>
|
|
209
|
+
{contentDescription}
|
|
210
|
+
</Description>
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return null;
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
return (
|
|
218
|
+
<View gap={3} direction={"column"}>
|
|
219
|
+
{hasDivider && <Divider />}
|
|
220
|
+
{renderContentDescription()}
|
|
221
|
+
</View>
|
|
222
|
+
);
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
const CallToAction = ({ children, ...rest }: ComponentProps<typeof Button>) => (
|
|
226
|
+
<Button color="positive" {...rest}>
|
|
227
|
+
{children}
|
|
228
|
+
</Button>
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
BaseOfferCard.Container = Container;
|
|
232
|
+
BaseOfferCard.TopContainer = TopContainer;
|
|
233
|
+
BaseOfferCard.Stats = StatsContainer;
|
|
234
|
+
BaseOfferCard.CallToAction = CallToAction;
|
|
235
|
+
BaseOfferCard.ChosenBy = ChosenBy;
|
|
236
|
+
BaseOfferCard.BottomBar = BottomBar;
|
|
237
|
+
BaseOfferCard.Content = Content;
|
|
238
|
+
BaseOfferCard.PartnerContainer = PartnerContainer;
|
|
239
|
+
BaseOfferCard.PartnerImage = PartnerImage;
|
|
240
|
+
BaseOfferCard.Headline = Headline;
|
|
241
|
+
BaseOfferCard.Description = Description;
|
|
242
|
+
BaseOfferCard.DescriptionPoints = DescriptionPoints;
|
|
243
|
+
BaseOfferCard.DescriptionHandler = DescriptionHandler;
|
|
244
|
+
BaseOfferCard.Stat = Stat;
|
|
245
|
+
BaseOfferCard.Tip = Tip;
|
|
246
|
+
BaseOfferCard.CreditCardImage = CreditCardImage;
|
|
247
|
+
BaseOfferCard.CreditCardContainer = CreditCardContainer;
|
|
248
|
+
BaseOfferCard.TopBar = TopBar;
|
|
249
|
+
BaseOfferCard.ProductType = ProductType;
|
|
250
|
+
|
|
251
|
+
export { BaseOfferCard };
|
|
252
|
+
|
|
253
|
+
const styles = StyleSheet.create({
|
|
254
|
+
container: {
|
|
255
|
+
justifyContent: "space-between",
|
|
256
|
+
padding: 16,
|
|
257
|
+
flexDirection: "column",
|
|
258
|
+
display: "flex",
|
|
259
|
+
flexGrow: 1,
|
|
260
|
+
},
|
|
261
|
+
tip: { textAlign: "center" },
|
|
262
|
+
creditCardContainer: {
|
|
263
|
+
alignItems: "center",
|
|
264
|
+
},
|
|
265
|
+
partnerContainer: { alignItems: "flex-start" },
|
|
266
|
+
baseOfferCard: {
|
|
267
|
+
borderRadius: 16,
|
|
268
|
+
overflow: "hidden",
|
|
269
|
+
flex: 1,
|
|
270
|
+
display: "flex",
|
|
271
|
+
},
|
|
272
|
+
topBar: {
|
|
273
|
+
paddingHorizontal: 16,
|
|
274
|
+
paddingVertical: 8,
|
|
275
|
+
justifyContent: "space-between",
|
|
276
|
+
alignItems: "baseline",
|
|
277
|
+
},
|
|
278
|
+
bottomBar: {
|
|
279
|
+
marginTop: "auto",
|
|
280
|
+
},
|
|
281
|
+
chosenBy: { justifyContent: "center", alignItems: "center" },
|
|
282
|
+
});
|