@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,209 @@
|
|
|
1
|
+
// Text.tsx
|
|
2
|
+
import React from "react";
|
|
3
|
+
import {
|
|
4
|
+
Text as RNText,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
type TextStyle,
|
|
7
|
+
type StyleProp,
|
|
8
|
+
type TextProps as RNTextProps,
|
|
9
|
+
} from "react-native";
|
|
10
|
+
import { useTheme } from "../../context/ThemeProvider";
|
|
11
|
+
|
|
12
|
+
// Define the variant types
|
|
13
|
+
export type Variant =
|
|
14
|
+
| "title-1"
|
|
15
|
+
| "title-2"
|
|
16
|
+
| "title-3"
|
|
17
|
+
| "title-4"
|
|
18
|
+
| "title-5"
|
|
19
|
+
| "title-6"
|
|
20
|
+
| "featured-1"
|
|
21
|
+
| "featured-2" // Vertical stat content
|
|
22
|
+
| "featured-3"
|
|
23
|
+
| "body-1"
|
|
24
|
+
| "body-2" // CTA Text
|
|
25
|
+
| "body-3" // Vertical Stat label , Horizontal Stat label and content, See Details.
|
|
26
|
+
| "caption-1"
|
|
27
|
+
| "caption-2"; // Credit Card Offer Card Tip
|
|
28
|
+
|
|
29
|
+
// Define text decoration
|
|
30
|
+
export type TextDecoration = "line-through";
|
|
31
|
+
|
|
32
|
+
// Define text color
|
|
33
|
+
export type TextColor =
|
|
34
|
+
| "neutral"
|
|
35
|
+
| "neutral-faded"
|
|
36
|
+
| "critical"
|
|
37
|
+
| "warning"
|
|
38
|
+
| "positive"
|
|
39
|
+
| "primary"
|
|
40
|
+
| "disabled";
|
|
41
|
+
|
|
42
|
+
// Define text weight
|
|
43
|
+
export type TextWeight = "regular" | "medium" | "bold";
|
|
44
|
+
|
|
45
|
+
// // Define wrap options
|
|
46
|
+
// export type TextWrap = "balance";
|
|
47
|
+
|
|
48
|
+
// Define props
|
|
49
|
+
export interface TextProps extends Omit<RNTextProps, "style"> {
|
|
50
|
+
variant?: Variant;
|
|
51
|
+
weight?: TextWeight;
|
|
52
|
+
color?: TextColor;
|
|
53
|
+
decoration?: TextDecoration;
|
|
54
|
+
children?: React.ReactNode;
|
|
55
|
+
style?: StyleProp<TextStyle>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const Text: React.FC<TextProps> = ({
|
|
59
|
+
variant,
|
|
60
|
+
weight,
|
|
61
|
+
color,
|
|
62
|
+
decoration,
|
|
63
|
+
children,
|
|
64
|
+
style,
|
|
65
|
+
...restProps
|
|
66
|
+
}) => {
|
|
67
|
+
const { fontFamily } = useTheme();
|
|
68
|
+
|
|
69
|
+
// Create style array
|
|
70
|
+
const styleArray: StyleProp<TextStyle>[] = [styles.base];
|
|
71
|
+
|
|
72
|
+
// Add variant styles
|
|
73
|
+
|
|
74
|
+
if (variant) {
|
|
75
|
+
styleArray.push(styles[variant]);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Add font family styles
|
|
79
|
+
styleArray.push({ fontFamily: fontFamily[weight || "regular"] });
|
|
80
|
+
|
|
81
|
+
// Add weight styles
|
|
82
|
+
styleArray.push({ fontWeight: weight === "medium" ? "500" : weight });
|
|
83
|
+
|
|
84
|
+
// Add color styles
|
|
85
|
+
if (color) {
|
|
86
|
+
styleArray.push(styles[`color-${color}`]);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Add decoration styles
|
|
90
|
+
if (decoration === "line-through") {
|
|
91
|
+
styleArray.push({ textDecorationLine: "line-through" });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Add custom styles
|
|
95
|
+
if (style) {
|
|
96
|
+
styleArray.push(style);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<RNText style={styleArray} ellipsizeMode={"tail"} {...restProps}>
|
|
101
|
+
{children}
|
|
102
|
+
</RNText>
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// Define styles
|
|
107
|
+
// Note: In a real implementation, these would be derived from a theme or design system
|
|
108
|
+
const styles = StyleSheet.create({
|
|
109
|
+
"base": {
|
|
110
|
+
fontFamily: "System",
|
|
111
|
+
},
|
|
112
|
+
// Variants
|
|
113
|
+
"title-1": {
|
|
114
|
+
fontSize: 32,
|
|
115
|
+
fontWeight: "bold",
|
|
116
|
+
lineHeight: 40,
|
|
117
|
+
},
|
|
118
|
+
"title-2": {
|
|
119
|
+
fontSize: 28,
|
|
120
|
+
fontWeight: "bold",
|
|
121
|
+
lineHeight: 36,
|
|
122
|
+
},
|
|
123
|
+
"title-3": {
|
|
124
|
+
fontSize: 24,
|
|
125
|
+
fontWeight: "bold",
|
|
126
|
+
lineHeight: 32,
|
|
127
|
+
},
|
|
128
|
+
"title-4": {
|
|
129
|
+
fontSize: 20,
|
|
130
|
+
fontWeight: "bold",
|
|
131
|
+
lineHeight: 28,
|
|
132
|
+
},
|
|
133
|
+
"title-5": {
|
|
134
|
+
fontSize: 18,
|
|
135
|
+
fontWeight: "bold",
|
|
136
|
+
lineHeight: 24,
|
|
137
|
+
},
|
|
138
|
+
"title-6": {
|
|
139
|
+
fontSize: 16,
|
|
140
|
+
fontWeight: "bold",
|
|
141
|
+
lineHeight: 22,
|
|
142
|
+
},
|
|
143
|
+
"featured-1": {
|
|
144
|
+
fontSize: 24,
|
|
145
|
+
lineHeight: 32,
|
|
146
|
+
},
|
|
147
|
+
"featured-2": {
|
|
148
|
+
fontSize: 24,
|
|
149
|
+
lineHeight: 32,
|
|
150
|
+
},
|
|
151
|
+
"featured-3": {
|
|
152
|
+
fontSize: 18,
|
|
153
|
+
lineHeight: 24,
|
|
154
|
+
},
|
|
155
|
+
"body-1": {
|
|
156
|
+
fontSize: 18,
|
|
157
|
+
lineHeight: 24,
|
|
158
|
+
},
|
|
159
|
+
"body-2": {
|
|
160
|
+
fontSize: 16,
|
|
161
|
+
lineHeight: 24,
|
|
162
|
+
},
|
|
163
|
+
"body-3": {
|
|
164
|
+
fontSize: 14,
|
|
165
|
+
lineHeight: 20,
|
|
166
|
+
},
|
|
167
|
+
"caption-1": {
|
|
168
|
+
fontSize: 12,
|
|
169
|
+
lineHeight: 16,
|
|
170
|
+
},
|
|
171
|
+
"caption-2": {
|
|
172
|
+
fontSize: 12,
|
|
173
|
+
lineHeight: 16,
|
|
174
|
+
},
|
|
175
|
+
// Weights
|
|
176
|
+
"weight-regular": {
|
|
177
|
+
fontWeight: "normal",
|
|
178
|
+
},
|
|
179
|
+
"weight-medium": {
|
|
180
|
+
fontWeight: "500",
|
|
181
|
+
},
|
|
182
|
+
"weight-bold": {
|
|
183
|
+
fontWeight: "bold",
|
|
184
|
+
},
|
|
185
|
+
// Colors
|
|
186
|
+
"color-neutral": {
|
|
187
|
+
color: "#2E2E2E",
|
|
188
|
+
},
|
|
189
|
+
"color-neutral-faded": {
|
|
190
|
+
color: "#6A6A6A",
|
|
191
|
+
},
|
|
192
|
+
"color-critical": {
|
|
193
|
+
color: "#D32F2F",
|
|
194
|
+
},
|
|
195
|
+
"color-warning": {
|
|
196
|
+
color: "#F57C00",
|
|
197
|
+
},
|
|
198
|
+
"color-positive": {
|
|
199
|
+
color: "#388E3C",
|
|
200
|
+
},
|
|
201
|
+
"color-primary": {
|
|
202
|
+
color: "#007c6a",
|
|
203
|
+
},
|
|
204
|
+
"color-disabled": {
|
|
205
|
+
color: "#AAAAAA",
|
|
206
|
+
},
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
export default Text;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View as RNView, type ViewStyle, StyleSheet } from "react-native";
|
|
3
|
+
|
|
4
|
+
export interface ViewProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
style?: ViewStyle;
|
|
7
|
+
backgroundColor?:
|
|
8
|
+
| "neutral"
|
|
9
|
+
| "neutral-faded"
|
|
10
|
+
| "critical"
|
|
11
|
+
| "critical-faded"
|
|
12
|
+
| "positive"
|
|
13
|
+
| "positive-faded"
|
|
14
|
+
| "warning"
|
|
15
|
+
| "warning-faded"
|
|
16
|
+
| "primary"
|
|
17
|
+
| "primary-faded"
|
|
18
|
+
| "elevation-base"
|
|
19
|
+
| "elevation-raised"
|
|
20
|
+
| "elevation-overlay"
|
|
21
|
+
| "page"
|
|
22
|
+
| "page-faded"
|
|
23
|
+
| "disabled"
|
|
24
|
+
| "disabled-faded"
|
|
25
|
+
| "brand"
|
|
26
|
+
| "white"
|
|
27
|
+
| "black";
|
|
28
|
+
borderColor?:
|
|
29
|
+
| "neutral"
|
|
30
|
+
| "positive"
|
|
31
|
+
| "warning"
|
|
32
|
+
| "critical"
|
|
33
|
+
| "primary"
|
|
34
|
+
| string;
|
|
35
|
+
direction?: "row" | "row-reverse" | "column" | "column-reverse";
|
|
36
|
+
height?: number | string;
|
|
37
|
+
maxHeight?: number | string;
|
|
38
|
+
minHeight?: number | string;
|
|
39
|
+
width?: number | string;
|
|
40
|
+
maxWidth?: number | string;
|
|
41
|
+
minWidth?: number | string;
|
|
42
|
+
gap?: number;
|
|
43
|
+
attributes?: { [key: string]: any };
|
|
44
|
+
testID?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const View: React.FC<ViewProps> = ({
|
|
48
|
+
children,
|
|
49
|
+
style,
|
|
50
|
+
backgroundColor,
|
|
51
|
+
borderColor,
|
|
52
|
+
direction,
|
|
53
|
+
height,
|
|
54
|
+
maxHeight,
|
|
55
|
+
minHeight,
|
|
56
|
+
width,
|
|
57
|
+
maxWidth,
|
|
58
|
+
minWidth,
|
|
59
|
+
gap,
|
|
60
|
+
attributes,
|
|
61
|
+
testID,
|
|
62
|
+
...rest
|
|
63
|
+
}) => {
|
|
64
|
+
// Create a single style object directly - faster than array.filter(Boolean)
|
|
65
|
+
const containerStyles: Record<string, any> = {
|
|
66
|
+
// Background color handling
|
|
67
|
+
...(backgroundColor && {
|
|
68
|
+
backgroundColor:
|
|
69
|
+
styles[`bg${backgroundColor}`]?.backgroundColor || backgroundColor,
|
|
70
|
+
}),
|
|
71
|
+
|
|
72
|
+
// Border color handling
|
|
73
|
+
...(borderColor && {
|
|
74
|
+
borderColor:
|
|
75
|
+
(borderColor in
|
|
76
|
+
["neutral", "positive", "warning", "critical", "primary"]
|
|
77
|
+
? styles[
|
|
78
|
+
`border${borderColor as "neutral" | "positive" | "warning" | "critical" | "primary"}`
|
|
79
|
+
]?.borderColor
|
|
80
|
+
: undefined) || borderColor,
|
|
81
|
+
}),
|
|
82
|
+
|
|
83
|
+
// Direction handling
|
|
84
|
+
...(direction && styles[`direction${direction}`]),
|
|
85
|
+
|
|
86
|
+
// Dimension styles - applied only when provided
|
|
87
|
+
...(height !== undefined && { height }),
|
|
88
|
+
...(maxHeight !== undefined && { maxHeight }),
|
|
89
|
+
...(minHeight !== undefined && { minHeight }),
|
|
90
|
+
...(width !== undefined && { width }),
|
|
91
|
+
...(maxWidth !== undefined && { maxWidth }),
|
|
92
|
+
...(minWidth !== undefined && { minWidth }),
|
|
93
|
+
|
|
94
|
+
// Spacing
|
|
95
|
+
...(gap !== undefined && { gap }),
|
|
96
|
+
|
|
97
|
+
// User-provided styles (highest priority)
|
|
98
|
+
...(style || {}),
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<RNView
|
|
103
|
+
style={containerStyles}
|
|
104
|
+
testID={attributes?.["data-testid"] || testID}
|
|
105
|
+
{...rest}
|
|
106
|
+
>
|
|
107
|
+
{children}
|
|
108
|
+
</RNView>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const styles = StyleSheet.create({
|
|
113
|
+
"bgneutral": { backgroundColor: "#e0e0e0" },
|
|
114
|
+
"bgneutral-faded": { backgroundColor: "#f5f5f5" },
|
|
115
|
+
"bgcritical": { backgroundColor: "#f44336" },
|
|
116
|
+
"bgcritical-faded": { backgroundColor: "#ffebee" },
|
|
117
|
+
"bgpositive": { backgroundColor: "#4caf50" },
|
|
118
|
+
"bgpositive-faded": { backgroundColor: "#e8f5e9" },
|
|
119
|
+
"bgwarning": { backgroundColor: "#ff9800" },
|
|
120
|
+
"bgwarning-faded": { backgroundColor: "#fff3e0" },
|
|
121
|
+
"bgprimary": { backgroundColor: "#2196f3" },
|
|
122
|
+
"bgprimary-faded": { backgroundColor: "#ebfff9" },
|
|
123
|
+
"bgelevation-base": { backgroundColor: "#fafafa" },
|
|
124
|
+
"bgelevation-raised": { backgroundColor: "#eeeeee" },
|
|
125
|
+
"bgelevation-overlay": { backgroundColor: "#bdbdbd" },
|
|
126
|
+
"bgpage": { backgroundColor: "#ffffff" },
|
|
127
|
+
"bgpage-faded": { backgroundColor: "#f5f5f5" },
|
|
128
|
+
"bgdisabled": { backgroundColor: "#bdbdbd" },
|
|
129
|
+
"bgdisabled-faded": { backgroundColor: "#e0e0e0" },
|
|
130
|
+
"bgbrand": { backgroundColor: "#6200ea" },
|
|
131
|
+
"bgwhite": { backgroundColor: "#ffffff" },
|
|
132
|
+
"bgblack": { backgroundColor: "#000000" },
|
|
133
|
+
"borderneutral": { borderColor: "#bdbdbd" },
|
|
134
|
+
"borderpositive": { borderColor: "#388e3c" },
|
|
135
|
+
"borderwarning": { borderColor: "#f57c00" },
|
|
136
|
+
"bordercritical": { borderColor: "#d32f2f" },
|
|
137
|
+
"borderprimary": { borderColor: "#1976d2" },
|
|
138
|
+
"directionrow": { flexDirection: "row" },
|
|
139
|
+
"directionrow-reverse": { flexDirection: "row-reverse" },
|
|
140
|
+
"directioncolumn": { flexDirection: "column" },
|
|
141
|
+
"directioncolumn-reverse": { flexDirection: "column-reverse" },
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
export default View;
|
|
File without changes
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React, { createContext, useContext } from "react";
|
|
2
|
+
import type { ResultType } from "../services/getProductTypes";
|
|
3
|
+
import type { BaseOffer } from "../../capabilities/offer-catalog/src";
|
|
4
|
+
|
|
5
|
+
interface onInitializeProps {
|
|
6
|
+
timestamp: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface onRateTableSubmitProps {
|
|
10
|
+
timestamp: string;
|
|
11
|
+
productTypes: string[];
|
|
12
|
+
resultType: ResultType;
|
|
13
|
+
defaultProductType: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface onRateTableResponseProps {
|
|
17
|
+
timestamp: string;
|
|
18
|
+
isError: boolean;
|
|
19
|
+
offers: BaseOffer[];
|
|
20
|
+
rateTableUuid: string;
|
|
21
|
+
leadUuid: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface onOfferDisplayInViewportProps {
|
|
25
|
+
timestamp: string;
|
|
26
|
+
offerUuid: string;
|
|
27
|
+
rateTableUuid: string;
|
|
28
|
+
leadUuid: string;
|
|
29
|
+
offer: BaseOffer;
|
|
30
|
+
offerIndex: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface onOfferClickProps {
|
|
34
|
+
timestamp: string;
|
|
35
|
+
offerUuid: string;
|
|
36
|
+
rateTableUuid: string;
|
|
37
|
+
leadUuid: string;
|
|
38
|
+
offer: BaseOffer;
|
|
39
|
+
offerIndex: number;
|
|
40
|
+
context: "offer" | "offer_details";
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface onOfferDetailsPageOpenProps {
|
|
44
|
+
timestamp: string;
|
|
45
|
+
offerUuid: string;
|
|
46
|
+
rateTableUuid: string;
|
|
47
|
+
leadUuid: string;
|
|
48
|
+
offer: BaseOffer;
|
|
49
|
+
offerIndex: number;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface onOfferDetailsPageCloseProps {
|
|
53
|
+
timestamp: string;
|
|
54
|
+
offerUuid: string;
|
|
55
|
+
rateTableUuid: string;
|
|
56
|
+
leadUuid: string;
|
|
57
|
+
offer: BaseOffer;
|
|
58
|
+
offerIndex: number;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface EventHandlerContextType {
|
|
62
|
+
onInitialize?: (props: onInitializeProps) => void;
|
|
63
|
+
onRateTableSubmit?: (props: onRateTableSubmitProps) => void;
|
|
64
|
+
onRateTableResponse?: (props: onRateTableResponseProps) => void;
|
|
65
|
+
onOfferDisplayInViewport?: (props: onOfferDisplayInViewportProps) => void;
|
|
66
|
+
onOfferClick?: (props: onOfferClickProps) => void;
|
|
67
|
+
onOfferDetailsPageOpen?: (props: onOfferDetailsPageOpenProps) => void;
|
|
68
|
+
onOfferDetailsPageClose?: (props: onOfferDetailsPageCloseProps) => void;
|
|
69
|
+
rateTableUuid: string;
|
|
70
|
+
leadUuid: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const EventHandlerContext = createContext<EventHandlerContextType>({
|
|
74
|
+
rateTableUuid: "",
|
|
75
|
+
leadUuid: "",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export const EventHandlerProvider: React.FC<{
|
|
79
|
+
children: React.ReactNode;
|
|
80
|
+
eventHandlers: EventHandlerContextType;
|
|
81
|
+
}> = ({ children, eventHandlers }) => {
|
|
82
|
+
return (
|
|
83
|
+
<EventHandlerContext.Provider value={eventHandlers}>
|
|
84
|
+
{children}
|
|
85
|
+
</EventHandlerContext.Provider>
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const useEventHandler = () => useContext(EventHandlerContext);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
createContext,
|
|
3
|
+
type FC,
|
|
4
|
+
type ReactNode,
|
|
5
|
+
useContext,
|
|
6
|
+
useState,
|
|
7
|
+
} from "react";
|
|
8
|
+
import { Platform } from "react-native";
|
|
9
|
+
|
|
10
|
+
export interface ThemePalette {
|
|
11
|
+
promotional?: string;
|
|
12
|
+
generation?: ("generate" | "provided") | null;
|
|
13
|
+
colorScheme?: ("balanced" | "light" | "dark") | null;
|
|
14
|
+
positive: string;
|
|
15
|
+
critical?: string;
|
|
16
|
+
highlight?: string;
|
|
17
|
+
neutral?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface FontFamily {
|
|
20
|
+
regular?: string;
|
|
21
|
+
medium?: string;
|
|
22
|
+
bold?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const defaultFontFamily: FontFamily = {
|
|
26
|
+
regular: Platform.OS === "android" ? "sans-serif" : "System",
|
|
27
|
+
medium: Platform.OS === "android" ? "sans-serif-medium" : "System",
|
|
28
|
+
bold: Platform.OS === "android" ? "sans-serif-bold" : "System",
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
interface ThemeContextType {
|
|
32
|
+
theme: ThemePalette;
|
|
33
|
+
fontFamily: FontFamily;
|
|
34
|
+
updateTheme: (newTheme: Partial<ThemePalette>) => void;
|
|
35
|
+
updateFontFamily: (newFontFamily: Partial<FontFamily>) => void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const ThemeContext = createContext<ThemeContextType | null>(null);
|
|
39
|
+
|
|
40
|
+
export const useTheme = () => {
|
|
41
|
+
const context = useContext(ThemeContext);
|
|
42
|
+
if (!context) {
|
|
43
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
44
|
+
}
|
|
45
|
+
return context;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
interface ThemeProviderProps {
|
|
49
|
+
palette?: ThemePalette;
|
|
50
|
+
fontFamily?: Partial<FontFamily>;
|
|
51
|
+
children: ReactNode;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const ThemeProvider: FC<ThemeProviderProps> = ({
|
|
55
|
+
palette = {} as ThemePalette, // should be safe to assert as ThemePalette since the fallback colors are already handled by the consumers of ThemeProvider
|
|
56
|
+
fontFamily = {},
|
|
57
|
+
children,
|
|
58
|
+
}) => {
|
|
59
|
+
const [theme, setTheme] = useState<ThemePalette>(palette);
|
|
60
|
+
const [fonts, setFonts] = useState<FontFamily>({
|
|
61
|
+
...defaultFontFamily,
|
|
62
|
+
...fontFamily,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const updateTheme = (newTheme: Partial<ThemePalette>) => {
|
|
66
|
+
setTheme((prevTheme) => ({
|
|
67
|
+
...prevTheme,
|
|
68
|
+
...newTheme,
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const updateFontFamily = (newFontFamily: Partial<FontFamily>) => {
|
|
73
|
+
setFonts((prevFonts) => ({
|
|
74
|
+
...prevFonts,
|
|
75
|
+
...newFontFamily,
|
|
76
|
+
}));
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const contextValue = {
|
|
80
|
+
theme,
|
|
81
|
+
fontFamily: fonts,
|
|
82
|
+
updateTheme,
|
|
83
|
+
updateFontFamily,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<ThemeContext.Provider value={contextValue}>
|
|
88
|
+
{children}
|
|
89
|
+
</ThemeContext.Provider>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
File without changes
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./components/MoneyLionOfferCarousel";
|
package/src/pageData.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
|
|
2
|
+
import { getIsDevEnvironment } from "../capabilities/offer-catalog/src/utils/contextUtil";
|
|
3
|
+
import type { MoneyLionOfferCarouselProps } from "./components/MoneyLionOfferCarousel";
|
|
4
|
+
import type { onRateTableSubmitProps } from "./context/EventHandlerProvider";
|
|
5
|
+
import { getDynamicOffers } from "./services/getDynamicOffers";
|
|
6
|
+
// import { getDynamicOffers } from "./services/getDynamicOffers";
|
|
7
|
+
import {
|
|
8
|
+
getDefaultProductType,
|
|
9
|
+
getLayout,
|
|
10
|
+
getProductTypesDefinition,
|
|
11
|
+
resolveProductTypes,
|
|
12
|
+
} from "./utils";
|
|
13
|
+
import { getEnableUseCachedOffers } from "./utils/getEnableUseCachedOffers";
|
|
14
|
+
|
|
15
|
+
type GetPageDataProps = {
|
|
16
|
+
context: CnfContext;
|
|
17
|
+
params: MoneyLionOfferCarouselProps;
|
|
18
|
+
onRateTableSubmit?: (props: onRateTableSubmitProps) => void;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export async function getPageData({
|
|
22
|
+
context,
|
|
23
|
+
params,
|
|
24
|
+
onRateTableSubmit,
|
|
25
|
+
}: GetPageDataProps) {
|
|
26
|
+
const {
|
|
27
|
+
productType,
|
|
28
|
+
query,
|
|
29
|
+
tags,
|
|
30
|
+
displayLayout,
|
|
31
|
+
searchAPIToken,
|
|
32
|
+
showProductTypeLabel,
|
|
33
|
+
} = params;
|
|
34
|
+
|
|
35
|
+
// Resolve Tags
|
|
36
|
+
const resolvedTags = `${tags?.trim()}`;
|
|
37
|
+
|
|
38
|
+
const enableUseCachedOffers = getEnableUseCachedOffers(context);
|
|
39
|
+
|
|
40
|
+
const defaultProductType = getDefaultProductType(context);
|
|
41
|
+
|
|
42
|
+
// TODO: Check if this is needed or if we can remove it
|
|
43
|
+
// const parsedStaticProductTypes = parseStringProductTypes(staticProductTypes);
|
|
44
|
+
|
|
45
|
+
const isDev = getIsDevEnvironment(context);
|
|
46
|
+
|
|
47
|
+
const { productTypesDefinition, partnersOverrideDefinition } =
|
|
48
|
+
getProductTypesDefinition(context);
|
|
49
|
+
|
|
50
|
+
const currentCountry = context.signals.deviceSignals.country;
|
|
51
|
+
|
|
52
|
+
const safeTags = encodeURI(resolvedTags);
|
|
53
|
+
|
|
54
|
+
const safeDisplayLayout = getLayout(displayLayout);
|
|
55
|
+
|
|
56
|
+
// Get product types and result type
|
|
57
|
+
const { productTypes, resultType } = await resolveProductTypes({
|
|
58
|
+
defaultProductType,
|
|
59
|
+
productType,
|
|
60
|
+
query,
|
|
61
|
+
searchAPIToken,
|
|
62
|
+
isDev,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
onRateTableSubmit?.({
|
|
66
|
+
timestamp: new Date().toISOString(),
|
|
67
|
+
productTypes,
|
|
68
|
+
resultType,
|
|
69
|
+
defaultProductType,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// Get offers
|
|
73
|
+
const { offers, isError, leadUuid, rateTableUuid } = await getDynamicOffers({
|
|
74
|
+
tags: safeTags,
|
|
75
|
+
displayLayout: safeDisplayLayout,
|
|
76
|
+
productTypes,
|
|
77
|
+
resultType,
|
|
78
|
+
enableUseCachedOffers,
|
|
79
|
+
productTypesDefinition: [...productTypesDefinition],
|
|
80
|
+
partnersOverrideDefinition: [...partnersOverrideDefinition],
|
|
81
|
+
context,
|
|
82
|
+
defaultProductType,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
isError,
|
|
87
|
+
leadUuid,
|
|
88
|
+
rateTableUuid,
|
|
89
|
+
// title,
|
|
90
|
+
offers,
|
|
91
|
+
currentCountry,
|
|
92
|
+
// videosContent,
|
|
93
|
+
// showBorder,
|
|
94
|
+
// shouldHideFooter,
|
|
95
|
+
showProductTypeLabel,
|
|
96
|
+
displayLayout: safeDisplayLayout,
|
|
97
|
+
};
|
|
98
|
+
}
|