@moneylion/react-native-offer-carousel 1.0.0 → 1.0.1
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 +44 -0
- package/lib/commonjs/capabilities/configuration/src/brands/checkVisualEligibility.js +30 -0
- package/lib/commonjs/capabilities/configuration/src/brands/checkVisualEligibility.js.map +1 -0
- package/lib/commonjs/capabilities/configuration/src/brands/createDerivedBrands.js +40 -0
- package/lib/commonjs/capabilities/configuration/src/brands/createDerivedBrands.js.map +1 -0
- package/lib/commonjs/capabilities/configuration/src/brands/index.js +20 -0
- package/lib/commonjs/capabilities/configuration/src/brands/index.js.map +1 -0
- package/lib/commonjs/capabilities/configuration/src/brands/types.js +13 -0
- package/lib/commonjs/capabilities/configuration/src/brands/types.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js +17 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +33 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/index.js +17 -0
- package/lib/commonjs/capabilities/core/src/index.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/CnfContext.js +18 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/CnfContext.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/App.js +18 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/App.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js +87 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Configuration.js +41 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Configuration.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Request.js +21 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Request.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Session.js +12 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Session.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Signals.js +41 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Signals.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Subaccount.js +26 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Subaccount.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/index.js +83 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js +131 -0
- package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/index.js +65 -0
- package/lib/commonjs/capabilities/offer-catalog/src/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/types/offerCatalogSchema.js +2 -0
- package/lib/commonjs/capabilities/offer-catalog/src/types/offerCatalogSchema.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js +11 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/contextUtil.js +70 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/contextUtil.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/errorUtil.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/errorUtil.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/formatUtils.js +161 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/formatUtils.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/getOfferUrl.js +44 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/getOfferUrl.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js +78 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js +22 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js +60 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.js +20 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js +62 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js +32 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js +31 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currency.js +22 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currency.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js +46 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js +208 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js +20 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js +24 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js +40 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/index.js +204 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js +35 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js +43 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js +32 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js +76 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js +69 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js +23 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js +47 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js +72 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js +23 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js +29 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js +53 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js +46 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js +26 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js +83 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js +28 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js +28 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js +30 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/index.js +48 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/types.js +6 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/types.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js +6 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js +2 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js +2 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/index.js +6 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/index.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js +74 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js +61 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js +143 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/index.js +54 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js +122 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/index.js +13 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/index.js +110 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js +91 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js +44 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/index.js +28 -0
- package/lib/commonjs/capabilities/ui/elements/src/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/offerCardAttributes.js +23 -0
- package/lib/commonjs/capabilities/ui/elements/src/offerCardAttributes.js.map +1 -0
- package/lib/commonjs/components/Cards/VideosCard/VideosCard.js +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/index.js +4 -4
- package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
- package/lib/commonjs/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
- package/lib/commonjs/components/Modal/DescriptionPoints.js +3 -3
- package/lib/commonjs/components/Modal/DescriptionPoints.js.map +1 -1
- package/lib/commonjs/components/Modal/Disclaimer.js +1 -1
- package/lib/commonjs/components/Modal/Disclaimer.js.map +1 -1
- package/lib/commonjs/components/MoneyLionOfferCarousel.js +1 -1
- package/lib/commonjs/config/mocks/cnfContext.js +143 -0
- package/lib/commonjs/config/mocks/cnfContext.js.map +1 -0
- package/lib/commonjs/pageData.js +1 -1
- package/lib/commonjs/services/getProductTypesByQuery.js +1 -1
- package/lib/commonjs/utils/formatOfferUrl.js +1 -1
- package/lib/commonjs/utils/getOffersByProductTypes.js +2 -2
- package/lib/module/capabilities/configuration/src/brands/checkVisualEligibility.js +24 -0
- package/lib/module/capabilities/configuration/src/brands/checkVisualEligibility.js.map +1 -0
- package/lib/module/capabilities/configuration/src/brands/createDerivedBrands.js +34 -0
- package/lib/module/capabilities/configuration/src/brands/createDerivedBrands.js.map +1 -0
- package/lib/module/capabilities/configuration/src/brands/index.js +3 -0
- package/lib/module/capabilities/configuration/src/brands/index.js.map +1 -0
- package/lib/module/capabilities/configuration/src/brands/types.js +6 -0
- package/lib/module/capabilities/configuration/src/brands/types.js.map +1 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/index.js +2 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/index.js.map +1 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +26 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +1 -0
- package/lib/module/capabilities/core/src/index.js +2 -0
- package/lib/module/capabilities/core/src/index.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/CnfContext.js +12 -0
- package/lib/module/capabilities/core/src/system/cnfContext/CnfContext.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/App.js +12 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/App.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js +81 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Configuration.js +35 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Configuration.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Request.js +15 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Request.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Session.js +6 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Session.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Signals.js +35 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Signals.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Subaccount.js +20 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Subaccount.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/index.js +8 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js +122 -0
- package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/index.js +5 -0
- package/lib/module/capabilities/offer-catalog/src/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/types/offerCatalogSchema.js +2 -0
- package/lib/module/capabilities/offer-catalog/src/types/offerCatalogSchema.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js +4 -0
- package/lib/module/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/contextUtil.js +58 -0
- package/lib/module/capabilities/offer-catalog/src/utils/contextUtil.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/errorUtil.js +15 -0
- package/lib/module/capabilities/offer-catalog/src/utils/errorUtil.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/formatUtils.js +151 -0
- package/lib/module/capabilities/offer-catalog/src/utils/formatUtils.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/getOfferUrl.js +37 -0
- package/lib/module/capabilities/offer-catalog/src/utils/getOfferUrl.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js +71 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js +15 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js +59 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.js +13 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js +61 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js +25 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js +30 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currency.js +15 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currency.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js +39 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js +207 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js +13 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js +23 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js +14 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js +39 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/index.js +20 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js +28 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js +42 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js +14 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js +31 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js +69 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js +68 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js +16 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js +40 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js +71 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js +16 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js +28 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js +46 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js +45 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js +19 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js +82 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js +21 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js +27 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js +14 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js +29 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/index.js +41 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/types.js +2 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/types.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/index.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/index.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js +65 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js +50 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js +134 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/index.js +46 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js +115 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/index.js +2 -0
- package/lib/module/capabilities/ui/elements/src/components/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/index.js +103 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js +86 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js +43 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/index.js +3 -0
- package/lib/module/capabilities/ui/elements/src/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/offerCardAttributes.js +16 -0
- package/lib/module/capabilities/ui/elements/src/offerCardAttributes.js.map +1 -0
- package/lib/module/components/Cards/VideosCard/VideosCard.js +1 -1
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js +1 -2
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
- package/lib/module/components/Common/BaseOfferCard/index.js +3 -4
- package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js.map +1 -1
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js.map +1 -1
- package/lib/module/components/Modal/DescriptionPoints.js +2 -2
- package/lib/module/components/Modal/DescriptionPoints.js.map +1 -1
- package/lib/module/components/Modal/Disclaimer.js +1 -1
- package/lib/module/components/Modal/Disclaimer.js.map +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/module/config/mocks/cnfContext.js +137 -0
- package/lib/module/config/mocks/cnfContext.js.map +1 -0
- package/lib/module/pageData.js +1 -1
- package/lib/module/pageData.js.map +1 -1
- package/lib/module/services/getProductTypesByQuery.js +1 -1
- package/lib/module/services/getProductTypesByQuery.js.map +1 -1
- package/lib/module/utils/formatOfferUrl.js +1 -1
- package/lib/module/utils/formatOfferUrl.js.map +1 -1
- package/lib/module/utils/getOffersByProductTypes.js +2 -2
- package/lib/module/utils/getOffersByProductTypes.js.map +1 -1
- package/lib/typescript/builder/builder.d.ts +2 -2
- package/lib/typescript/builder/builder.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/createDerivedBrands.d.ts +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/configuration/src/brands/index.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/types.d.ts +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/types.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/CnfContext.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/App.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Request.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Session.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/errorUtil.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/types.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts +9 -9
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/components.d.ts +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/index.d.ts +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/offerCardAttributes.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts +5 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts +2 -2
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts +2 -2
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts +3 -3
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts +1 -1
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -1
- package/lib/typescript/src/config/mocks/cnfContext.d.ts.map +1 -0
- package/lib/typescript/src/context/EventHandlerProvider.d.ts +1 -1
- package/lib/typescript/src/context/EventHandlerProvider.d.ts.map +1 -1
- package/lib/typescript/src/pageData.d.ts +2 -2
- package/lib/typescript/src/pageData.d.ts.map +1 -1
- package/lib/typescript/src/services/getDynamicOffers.d.ts +3 -3
- package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts +1 -1
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts.map +1 -1
- package/lib/typescript/src/utils/formatOfferUrl.d.ts +1 -1
- package/lib/typescript/src/utils/formatOfferUrl.d.ts.map +1 -1
- package/lib/typescript/src/utils/getDefaultProductType.d.ts +1 -1
- package/lib/typescript/src/utils/getDefaultProductType.d.ts.map +1 -1
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts +1 -1
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts +1 -1
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts.map +1 -1
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts +2 -2
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts +1 -1
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts.map +1 -1
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts +1 -1
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts +1 -1
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/capabilities/configuration/src/brands/checkVisualEligibility.ts +29 -0
- package/src/capabilities/configuration/src/brands/createDerivedBrands.ts +39 -0
- package/src/capabilities/configuration/src/brands/index.ts +2 -0
- package/src/capabilities/configuration/src/brands/types.ts +8 -0
- package/src/capabilities/core/src/domain/third-party-search/index.ts +1 -0
- package/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.ts +33 -0
- package/src/capabilities/core/src/index.ts +1 -0
- package/src/capabilities/core/src/system/cnfContext/CnfContext.ts +21 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/App.ts +13 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Brand.ts +119 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Configuration.ts +49 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Request.ts +16 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Session.ts +9 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Signals.ts +47 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Subaccount.ts +25 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/index.ts +7 -0
- package/src/capabilities/offer-catalog/src/api/offerCatalogApi.ts +171 -0
- package/src/capabilities/offer-catalog/src/index.ts +10 -0
- package/src/capabilities/offer-catalog/src/types/offerCatalogSchema.ts +119 -0
- package/src/capabilities/offer-catalog/src/utils/arrayToMarkdownList.ts +3 -0
- package/src/capabilities/offer-catalog/src/utils/contextUtil.ts +73 -0
- package/src/capabilities/offer-catalog/src/utils/errorUtil.ts +18 -0
- package/src/capabilities/offer-catalog/src/utils/formatUtils.ts +168 -0
- package/src/capabilities/offer-catalog/src/utils/getOfferUrl.ts +61 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.ts +103 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.ts +58 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.ts +31 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.ts +60 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/common.ts +31 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.ts +29 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.ts +36 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/currency.ts +24 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.ts +206 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.ts +83 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.ts +22 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.ts +25 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.ts +38 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.ts +24 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/index.ts +19 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.ts +41 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.ts +52 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.ts +30 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.ts +23 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.ts +67 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.ts +92 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.ts +34 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.ts +70 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.ts +71 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.ts +27 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.ts +38 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.ts +44 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.ts +68 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.ts +81 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.ts +38 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.ts +26 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.ts +45 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.ts +28 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.ts +23 -0
- package/src/capabilities/offer-catalog/src/utils/stats/index.ts +141 -0
- package/src/capabilities/offer-catalog/src/utils/stats/types.ts +47 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.ts +6 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.ts +2272 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.ts +1924 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/types/index.ts +5 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.ts +83 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.tsx +66 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/components.tsx +175 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/index.tsx +52 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.ts +124 -0
- package/src/capabilities/ui/elements/src/components/index.ts +1 -0
- package/src/capabilities/ui/elements/src/components/thumbor/index.tsx +115 -0
- package/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.ts +42 -0
- package/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.ts +110 -0
- package/src/capabilities/ui/elements/src/index.ts +3 -0
- package/src/capabilities/ui/elements/src/offerCardAttributes.ts +28 -0
- package/src/components/Cards/VideosCard/VideosCard.tsx +1 -1
- package/src/components/Common/BaseOfferCard/Stat/Stat.tsx +7 -2
- package/src/components/Common/BaseOfferCard/index.tsx +3 -4
- package/src/components/Common/DynamicOfferCard/CallToAction.tsx +1 -1
- package/src/components/Common/DynamicOfferCard/SeeMore.tsx +1 -1
- package/src/components/Common/DynamicOfferCard/index.tsx +1 -1
- package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +1 -1
- package/src/components/DynamicOffers/Render/FallbackOfferTemplate.tsx +1 -1
- package/src/components/DynamicOffers/Render/Offer.tsx +1 -1
- package/src/components/Layouts/CreditCardOfferCard/index.tsx +1 -1
- package/src/components/Layouts/CreditCardOfferCard/statsBuilder.tsx +2 -2
- package/src/components/Layouts/DefaultOfferCard/index.tsx +1 -1
- package/src/components/Layouts/DefaultOfferCard/statsBuilder.tsx +2 -2
- package/src/components/Layouts/HeadlineWithDescriptionCard/index.tsx +1 -1
- package/src/components/Modal/DescriptionPoints.tsx +2 -2
- package/src/components/Modal/Disclaimer.tsx +1 -1
- package/src/components/Modal/OfferDetailsModal.tsx +1 -1
- package/src/components/MoneyLionOfferCarousel.tsx +2 -2
- package/src/config/mocks/cnfContext.ts +136 -0
- package/src/context/EventHandlerProvider.tsx +1 -1
- package/src/pageData.ts +2 -2
- package/src/services/getDynamicOffers.ts +2 -2
- package/src/services/getProductTypesByQuery.ts +1 -1
- package/src/utils/addClientTagsToOfferLinks.ts +1 -1
- package/src/utils/formatOfferUrl.ts +1 -1
- package/src/utils/getDefaultProductType.ts +1 -1
- package/src/utils/getEnableUseCachedOffers.ts +1 -1
- package/src/utils/getOffersBasedOnLayout.ts +1 -1
- package/src/utils/getOffersByProductTypes.ts +3 -3
- package/src/utils/getProductTypesDefinition.ts +1 -1
- package/src/utils/selectDynamicOffers.ts +1 -1
- package/src/utils/sortOffersByRecommendationScore.ts +1 -1
- package/lib/typescript/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +0 -1
- package/lib/typescript/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +0 -1
- package/lib/typescript/capabilities/configuration/src/brands/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/configuration/src/brands/types.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/domain/third-party-search/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/CnfContext.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/App.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Request.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Session.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/errorUtil.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/types.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts +0 -7
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts +0 -12
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts +0 -2
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/offerCardAttributes.d.ts.map +0 -1
- package/lib/typescript/config/mocks/cnfContext.d.ts.map +0 -1
- /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/checkVisualEligibility.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/domain/third-party-search/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/CnfContext.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/App.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Brand.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Configuration.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Request.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Session.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Signals.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Subaccount.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/api/offerCatalogApi.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/types/offerCatalogSchema.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/arrayToMarkdownList.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/contextUtil.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/errorUtil.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/formatUtils.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/getOfferUrl.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/annualFee.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/boolean.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/common.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/common.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currency.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/percentage.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/types.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/types/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/Abbreviation.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/offerCardAttributes.d.ts +0 -0
- /package/lib/typescript/{config → src/config}/mocks/cnfContext.d.ts +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export type BaseOffer = {
|
|
2
|
+
productVersions: number[];
|
|
3
|
+
uuid: string;
|
|
4
|
+
version: number;
|
|
5
|
+
url: string;
|
|
6
|
+
financialInstitutionUuid: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
internalName: string;
|
|
9
|
+
legalLanguage?: string;
|
|
10
|
+
unmonetizedUrl: string;
|
|
11
|
+
recommendationScore: number;
|
|
12
|
+
productDisplayName: string;
|
|
13
|
+
productType: string;
|
|
14
|
+
financialInstitutionImageUrl: string;
|
|
15
|
+
status: "active" | "inactive" | "pending";
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
financialInstitutionDisplayName: string;
|
|
18
|
+
keywords?: string[];
|
|
19
|
+
acceptanceRequirements?: string;
|
|
20
|
+
headline?: string;
|
|
21
|
+
monetizedUrl?: string;
|
|
22
|
+
disclaimer?: string;
|
|
23
|
+
firmness?: string;
|
|
24
|
+
annualPercentageRateType?: "fixed" | "variable";
|
|
25
|
+
annualPercentageRateBasisPointsMax?: number;
|
|
26
|
+
annualPercentageRateBasisPointsMin?: number;
|
|
27
|
+
amountCentsMax?: number;
|
|
28
|
+
amountCentsMin?: number;
|
|
29
|
+
description?: string;
|
|
30
|
+
descriptionPoints?: string[];
|
|
31
|
+
monthlyPaymentCentsMin?: number;
|
|
32
|
+
monthlyPaymentCentsMax?: number;
|
|
33
|
+
creditBureauReporting?: string[];
|
|
34
|
+
stateExclusions?: string[];
|
|
35
|
+
enrollmentFeeBasisPointsMax?: number;
|
|
36
|
+
enrollmentFeeBasisPointsMin?: number;
|
|
37
|
+
debtAmountCentsMin?: number;
|
|
38
|
+
debtAmountCentsMax?: number;
|
|
39
|
+
monthlyFeeCentsMin?: number;
|
|
40
|
+
monthlyFeeCentsMax?: number;
|
|
41
|
+
fastTransferFeeCentsMin?: number;
|
|
42
|
+
fastTransferFeeCentsMax?: number;
|
|
43
|
+
fastTransferFeeBasisPointsMin?: number;
|
|
44
|
+
fastTransferFeeBasisPointsMax?: number;
|
|
45
|
+
annualAdvisoryFeeBasisPointsMin?: number;
|
|
46
|
+
annualAdvisoryFeeBasisPointsMax?: number;
|
|
47
|
+
accountCentsMin?: number;
|
|
48
|
+
termLengthMonthsMin?: number;
|
|
49
|
+
termLengthMonthsMax?: number;
|
|
50
|
+
demandSubAccountUuid?: string;
|
|
51
|
+
demandSubAccountImageUrl?: string;
|
|
52
|
+
demandSubAccountDisplayName?: string;
|
|
53
|
+
outOfNetworkAtmUsageFeeCents?: number;
|
|
54
|
+
annualPercentageYieldBasisPoints?: number;
|
|
55
|
+
isMonetized?: boolean;
|
|
56
|
+
overrideUrl?: string;
|
|
57
|
+
};
|
|
58
|
+
export type DemandPartner = {
|
|
59
|
+
uuid: string;
|
|
60
|
+
name: string;
|
|
61
|
+
description: string;
|
|
62
|
+
disclaimer: string;
|
|
63
|
+
supportsPreSelect: boolean;
|
|
64
|
+
shouldDisplayPreSelect: boolean;
|
|
65
|
+
supportsPersonalizedOffers: boolean;
|
|
66
|
+
imageUrl: string;
|
|
67
|
+
subtextOverride?: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type BasicRateTablePendingResponse = {
|
|
71
|
+
partner: DemandPartner;
|
|
72
|
+
offerCatalogProductTypes: string[];
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export type ProductTypes =
|
|
76
|
+
| "CreditBuilderLoan"
|
|
77
|
+
| "DebtSettlement"
|
|
78
|
+
| "HomeEquityLineOfCredit"
|
|
79
|
+
| "RoboInvesting"
|
|
80
|
+
| "StudentLoanRefinance"
|
|
81
|
+
| "IncomeOpportunities"
|
|
82
|
+
| "CashManagementAccount"
|
|
83
|
+
| "HomeEquityLoan"
|
|
84
|
+
| "StudentLoan"
|
|
85
|
+
| "CashAdvance"
|
|
86
|
+
| "EarnedWageAccess"
|
|
87
|
+
| "RoboInvesting"
|
|
88
|
+
| "StudentLoanRefinance"
|
|
89
|
+
| "StudentLoan"
|
|
90
|
+
| "AutomobileLoan"
|
|
91
|
+
| "AutomobileRefinance"
|
|
92
|
+
| "UnsecuredPersonalLoan"
|
|
93
|
+
| "SecuredPersonalLoan"
|
|
94
|
+
| "UnsecuredLineOfCredit"
|
|
95
|
+
| "OverdraftProtection"
|
|
96
|
+
| "CreditBuilderSecuredCreditCard"
|
|
97
|
+
| "CreditBuilderDebitCard"
|
|
98
|
+
| "RentUtilityBillReporting"
|
|
99
|
+
| (string & {});
|
|
100
|
+
|
|
101
|
+
export type OffersData = {
|
|
102
|
+
isError?: boolean;
|
|
103
|
+
uuid: string;
|
|
104
|
+
leadUuid: string;
|
|
105
|
+
offers: BaseOffer[];
|
|
106
|
+
pendingResponses?: BasicRateTablePendingResponse[];
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export type ProductTypeDefinition = {
|
|
110
|
+
id: string;
|
|
111
|
+
partnerPageUrl: string;
|
|
112
|
+
productTypeSlug: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export type PartnerOverride = {
|
|
116
|
+
id: string;
|
|
117
|
+
overrideUrl: string;
|
|
118
|
+
financialInstitutionUuid: string;
|
|
119
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { CnfContext } from "../../../core/src/system/cnfContext/CnfContext";
|
|
2
|
+
|
|
3
|
+
const STATE_CODE_FALLBACK = "NY";
|
|
4
|
+
|
|
5
|
+
export const getStateCode = (cnfContext: CnfContext) => {
|
|
6
|
+
const stateCode = cnfContext.signals.deviceSignals?.state?.code;
|
|
7
|
+
|
|
8
|
+
if (!stateCode) {
|
|
9
|
+
console.warn(stateCode, "state code not found in getCNFContext");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return stateCode || STATE_CODE_FALLBACK;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const getSubaccountToken = (cnfContext: CnfContext) =>
|
|
16
|
+
cnfContext.subaccount.publicToken;
|
|
17
|
+
|
|
18
|
+
export const parseClientTags = (tags?: string) => {
|
|
19
|
+
if (!tags) {
|
|
20
|
+
return {};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Decode the tags to handle special characters
|
|
24
|
+
const decodedTags = decodeURIComponent(tags);
|
|
25
|
+
|
|
26
|
+
const clientTags = decodedTags
|
|
27
|
+
// Split the tags by the 'tag.' prefix to get the individual tags
|
|
28
|
+
.split(/(?=(?:^|&)tag\.)/)
|
|
29
|
+
.reduce<Record<string, string[]>>((acc, tag) => {
|
|
30
|
+
// Remove the leading '&' from the tag if it exists
|
|
31
|
+
const cleanTag = tag.replace(/^&/, "");
|
|
32
|
+
// Find the index of the '=' character in the tag
|
|
33
|
+
const equalIndex = cleanTag.indexOf("=");
|
|
34
|
+
|
|
35
|
+
// If the tag is not a valid key-value pair, return the accumulator
|
|
36
|
+
if (equalIndex === -1) return acc;
|
|
37
|
+
|
|
38
|
+
// Extract the key and value from the tag
|
|
39
|
+
const key = cleanTag.substring(0, equalIndex);
|
|
40
|
+
const value = cleanTag.substring(equalIndex + 1);
|
|
41
|
+
|
|
42
|
+
// If the key starts with 'tag.', it is a valid client tag
|
|
43
|
+
if (key.startsWith("tag.")) {
|
|
44
|
+
const cleanKey = key.replace("tag.", "");
|
|
45
|
+
// Handle comma-separated or pipe-separated values
|
|
46
|
+
if (value.includes(",") || value.includes("|")) {
|
|
47
|
+
// Split the value into an array based on comma or pipe separators
|
|
48
|
+
acc[cleanKey] = value.split(/[,|]/);
|
|
49
|
+
} else {
|
|
50
|
+
// If the value is not comma or pipe separated, add it to the accumulator as a single value
|
|
51
|
+
acc[cleanKey] = [value];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return acc;
|
|
55
|
+
}, {});
|
|
56
|
+
|
|
57
|
+
return clientTags;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const getSubAccountUUID = (cnfContext: CnfContext) => {
|
|
61
|
+
const supplySubaccountUuid = cnfContext.subaccount.supplySubaccountUuid;
|
|
62
|
+
|
|
63
|
+
if (!supplySubaccountUuid) {
|
|
64
|
+
console.warn("Supply subaccount uuid not found in context");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return supplySubaccountUuid;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const getLeadUUID = (cnfContext: CnfContext) =>
|
|
71
|
+
cnfContext.signals.lead.uuid;
|
|
72
|
+
|
|
73
|
+
export const getIsDevEnvironment = (cnfContext: CnfContext) => cnfContext.isDev;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const errorUtil = {
|
|
2
|
+
getErrorMessageForResponseStatus(status: number, statusText: string): string {
|
|
3
|
+
return `${status}: ${statusText}`;
|
|
4
|
+
},
|
|
5
|
+
getErrorForOffersFromProductTypes(
|
|
6
|
+
error: "DEVICE_SIGNALS_ERROR" | "NO_OFFERS" | "DEFAULT"
|
|
7
|
+
): string {
|
|
8
|
+
const errorMessages = {
|
|
9
|
+
DEVICE_SIGNALS_ERROR: "Error getting device signals",
|
|
10
|
+
NO_OFFERS: "No offers found",
|
|
11
|
+
DEFAULT: "An unexpected error occurred in getOffersFromProductTypes",
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
return errorMessages[error] || errorMessages.DEFAULT;
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default errorUtil;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import numbro from "numbro";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Format the amount
|
|
5
|
+
* @param amount {number | undefined} - Amount in cents
|
|
6
|
+
* @param raw {boolean | undefined} - Returns the amount in raw cents (currently only used for zero values)
|
|
7
|
+
* @returns {string}
|
|
8
|
+
* @example
|
|
9
|
+
* formatAmount(undefined)
|
|
10
|
+
* // returns 'N/A'
|
|
11
|
+
* formatAmount(0)
|
|
12
|
+
* // returns 'Free'
|
|
13
|
+
* formatAmount(1000)
|
|
14
|
+
* // returns '$10'
|
|
15
|
+
* formatAmount(100000)
|
|
16
|
+
* // returns '$1K'
|
|
17
|
+
*/
|
|
18
|
+
export const formatAmount = (amount?: number, raw?: boolean): string => {
|
|
19
|
+
if (Number.isNaN(amount) || amount === undefined) return "N/A";
|
|
20
|
+
if (amount === 0 && !raw) return "FREE";
|
|
21
|
+
|
|
22
|
+
// Convert cents to dollars
|
|
23
|
+
const isLargeAmount = amount >= 99999900;
|
|
24
|
+
const amountInDollars = isLargeAmount
|
|
25
|
+
? (Math.ceil(amount / 1000000) * 1000000) / 100 // Round to nearest million if large
|
|
26
|
+
: amount / 100;
|
|
27
|
+
|
|
28
|
+
// Format the amount in dollars
|
|
29
|
+
const formattedAmount = numbro(amountInDollars).formatCurrency({
|
|
30
|
+
average: amountInDollars >= 1000,
|
|
31
|
+
mantissa: amountInDollars < 1000 ? 2 : 1,
|
|
32
|
+
trimMantissa: !(amount < 100 && amount !== 0),
|
|
33
|
+
spaceSeparated: false,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return formattedAmount.toUpperCase();
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Format the percentage
|
|
41
|
+
* @param percentage {number}
|
|
42
|
+
* @returns {string}
|
|
43
|
+
* @example
|
|
44
|
+
* formatPercentage(undefined)
|
|
45
|
+
* // returns 'N/A'
|
|
46
|
+
* formatPercentage(399)
|
|
47
|
+
* // returns '3.99%'
|
|
48
|
+
* formatPercentage(1800)
|
|
49
|
+
* // returns '18%'
|
|
50
|
+
*/
|
|
51
|
+
export const formatPercentage = (percentage?: number): string => {
|
|
52
|
+
if (percentage === undefined || percentage === null) return "N/A";
|
|
53
|
+
|
|
54
|
+
return `${numbro(percentage / 100).format({
|
|
55
|
+
mantissa: 2,
|
|
56
|
+
trimMantissa: true,
|
|
57
|
+
})}%`;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Format the strings with commas and add '&' to the last string
|
|
62
|
+
* @param strings {string[]}
|
|
63
|
+
* @returns {string}
|
|
64
|
+
* @example
|
|
65
|
+
* addAndToLastString(['CT', 'DE', 'GA', 'HI', 'IL'])
|
|
66
|
+
* // returns 'CT, DE, GA, HI & IL'
|
|
67
|
+
*/
|
|
68
|
+
export const formatStringListWithAnd = (strings?: string[]): string => {
|
|
69
|
+
if (!strings?.length) {
|
|
70
|
+
return "N/A";
|
|
71
|
+
}
|
|
72
|
+
if (strings.length === 1) {
|
|
73
|
+
return strings[0] ?? "N/A";
|
|
74
|
+
}
|
|
75
|
+
const newStrings = [...strings];
|
|
76
|
+
const lastString = newStrings.pop();
|
|
77
|
+
return `${newStrings.join(", ")} & ${lastString}`;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Format the amount with unabreviated values
|
|
82
|
+
* @param amount {number | undefined} - Amount in cents
|
|
83
|
+
* @param raw {boolean | undefined} - Returns the amount in raw cents (currently only used for zero values)
|
|
84
|
+
* @returns {string}
|
|
85
|
+
* @example
|
|
86
|
+
* formatAmountUnabbreviated(undefined)
|
|
87
|
+
* // returns 'N/A'
|
|
88
|
+
* formatAmountUnabbreviated(0)
|
|
89
|
+
* // returns 'Free'
|
|
90
|
+
* formatAmountUnabbreviated(1000)
|
|
91
|
+
* // returns '$10'
|
|
92
|
+
* formatAmountUnabbreviated(100000)
|
|
93
|
+
* // returns '$1,000'
|
|
94
|
+
* formatAmountUnabbreviated(10000000)
|
|
95
|
+
* // returns '$100,000'
|
|
96
|
+
*/
|
|
97
|
+
const formatAmountUnabbreviated = (amount?: number, raw?: boolean): string => {
|
|
98
|
+
if (Number.isNaN(amount) || amount === undefined) return "N/A";
|
|
99
|
+
if (amount === 0 && !raw) return "FREE";
|
|
100
|
+
|
|
101
|
+
// Convert cents to dollars
|
|
102
|
+
const isLargeAmount = amount >= 99999900;
|
|
103
|
+
const amountInDollars = isLargeAmount
|
|
104
|
+
? (Math.ceil(amount / 1000000) * 1000000) / 100 // Round to nearest million if large
|
|
105
|
+
: amount / 100;
|
|
106
|
+
// Format the amount in dollars
|
|
107
|
+
const formattedAmount = numbro(amountInDollars).formatCurrency({
|
|
108
|
+
mantissa: amountInDollars < 1000 ? 2 : 1,
|
|
109
|
+
trimMantissa: !(amount < 100 && amount !== 0),
|
|
110
|
+
spaceSeparated: false,
|
|
111
|
+
thousandSeparated: true,
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
return formattedAmount.toUpperCase();
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Format the range based on the min and max values
|
|
119
|
+
* @param min {number | undefined}
|
|
120
|
+
* @param max {number | undefined}
|
|
121
|
+
* @param type {string | undefined}
|
|
122
|
+
* @returns {string}
|
|
123
|
+
* @example
|
|
124
|
+
* formatRange(undefined, undefined)
|
|
125
|
+
* // returns 'N/A'
|
|
126
|
+
* formatRange(100, undefined)
|
|
127
|
+
* // returns 'N/A'
|
|
128
|
+
* formatRange(undefined, 100)
|
|
129
|
+
* // returns 'N/A'
|
|
130
|
+
* formatRange(0, 0)
|
|
131
|
+
* // returns 'Free'
|
|
132
|
+
* formatRange(100, 100)
|
|
133
|
+
* // returns '$1'
|
|
134
|
+
* formatRange(1000, 1000)
|
|
135
|
+
* // returns '$10'
|
|
136
|
+
* formatRange(1000, 10000)
|
|
137
|
+
* // returns '$10 - $100'
|
|
138
|
+
* formatRange(1000, 100000)
|
|
139
|
+
* // returns '$10 - $1K'
|
|
140
|
+
* formatRange(350, 490, 'percentage')
|
|
141
|
+
* // returns '3.5% - 4.9%'
|
|
142
|
+
* formatRange(1000, 10000, 'percentage')
|
|
143
|
+
* // returns '10% - 100%'
|
|
144
|
+
*/
|
|
145
|
+
export const formatRange = (
|
|
146
|
+
min?: number,
|
|
147
|
+
max?: number,
|
|
148
|
+
type: "amount" | "percentage" = "amount",
|
|
149
|
+
amountFormat?: "unabbreviated"
|
|
150
|
+
): string => {
|
|
151
|
+
const resolvedFormatAmount =
|
|
152
|
+
amountFormat === "unabbreviated" ? formatAmountUnabbreviated : formatAmount;
|
|
153
|
+
if (min === undefined || max === undefined) return "N/A";
|
|
154
|
+
|
|
155
|
+
if (type === "percentage") {
|
|
156
|
+
return min === max
|
|
157
|
+
? formatPercentage(min)
|
|
158
|
+
: `${formatPercentage(min)} - ${formatPercentage(max)}`;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if ((min === 0 || min === 1) && max !== 0) {
|
|
162
|
+
return `Up to ${resolvedFormatAmount(max)}`;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return min === max
|
|
166
|
+
? resolvedFormatAmount(min)
|
|
167
|
+
: `${resolvedFormatAmount(min)} - ${resolvedFormatAmount(max)}`;
|
|
168
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
BaseOffer,
|
|
3
|
+
ProductTypeDefinition,
|
|
4
|
+
PartnerOverride,
|
|
5
|
+
} from "../types/offerCatalogSchema";
|
|
6
|
+
|
|
7
|
+
type GetOfferUrlProps = {
|
|
8
|
+
offer: BaseOffer;
|
|
9
|
+
productTypesDefinition?: ProductTypeDefinition[];
|
|
10
|
+
partnersOverrideDefinition?: PartnerOverride[];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
type GetOfferUrlResult = {
|
|
14
|
+
url: string;
|
|
15
|
+
overrideUrl?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Get the offer URL.
|
|
20
|
+
* @description
|
|
21
|
+
* Returns the offer URL and any applicable override URL based on the provided offer and definitions.
|
|
22
|
+
* Override URL determination process:
|
|
23
|
+
* 1. First checks for a product type override from productTypesDefinition
|
|
24
|
+
* 2. Then checks for a partner override from partnersOverrideDefinition (takes precedence)
|
|
25
|
+
* The base offer URL is always returned, while the override URL is optional.
|
|
26
|
+
* @param {GetOfferUrlProps} props - The properties for getting the offer URL.
|
|
27
|
+
* @returns {GetOfferUrlResult} An object containing the URL and optional override URL.
|
|
28
|
+
**/
|
|
29
|
+
export const getOfferUrl = ({
|
|
30
|
+
offer,
|
|
31
|
+
productTypesDefinition,
|
|
32
|
+
partnersOverrideDefinition,
|
|
33
|
+
}: GetOfferUrlProps): GetOfferUrlResult => {
|
|
34
|
+
// Start with the base result
|
|
35
|
+
const result: GetOfferUrlResult = {
|
|
36
|
+
url: offer.url,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// Check product type override first
|
|
40
|
+
const partnerPageUrl = productTypesDefinition?.find(
|
|
41
|
+
(definition) => definition.productTypeSlug === offer.productType
|
|
42
|
+
)?.partnerPageUrl;
|
|
43
|
+
|
|
44
|
+
if (partnerPageUrl) {
|
|
45
|
+
result.overrideUrl = partnerPageUrl;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!partnersOverrideDefinition?.length) return result;
|
|
49
|
+
|
|
50
|
+
// Check partner override second (will overwrite product type override if exists)
|
|
51
|
+
const partnerOverride = partnersOverrideDefinition?.find(
|
|
52
|
+
(partner) =>
|
|
53
|
+
partner.financialInstitutionUuid === offer.financialInstitutionUuid
|
|
54
|
+
)?.overrideUrl;
|
|
55
|
+
|
|
56
|
+
if (partnerOverride) {
|
|
57
|
+
result.overrideUrl = partnerOverride;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return result;
|
|
61
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { get } from "radash";
|
|
2
|
+
import { P, match } from "ts-pattern";
|
|
3
|
+
import type { StatElementProps } from "../types";
|
|
4
|
+
import { formatAmount, formatRange } from "../../formatUtils";
|
|
5
|
+
import type { BaseOffer } from "../../../types/offerCatalogSchema";
|
|
6
|
+
|
|
7
|
+
export type AnnualFeeStat = {
|
|
8
|
+
format: "annualFee";
|
|
9
|
+
label: string;
|
|
10
|
+
minAnnualFeeField: string;
|
|
11
|
+
maxAnnualFeeField: string;
|
|
12
|
+
annualIntroFeeField: string;
|
|
13
|
+
annualIntroFeeTermField: string;
|
|
14
|
+
raw?: boolean;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const determineContent = ({
|
|
18
|
+
minAnnualFeeValue,
|
|
19
|
+
maxAnnualFeeValue,
|
|
20
|
+
annualIntroFeeValue,
|
|
21
|
+
annualIntroFeeTermValue,
|
|
22
|
+
raw,
|
|
23
|
+
}: {
|
|
24
|
+
annualFeeValue?: string;
|
|
25
|
+
minAnnualFeeValue?: number;
|
|
26
|
+
maxAnnualFeeValue?: number;
|
|
27
|
+
annualIntroFeeValue?: number;
|
|
28
|
+
annualIntroFeeTermValue?: number;
|
|
29
|
+
raw: boolean;
|
|
30
|
+
}) => {
|
|
31
|
+
return match({
|
|
32
|
+
minAnnualFeeValue,
|
|
33
|
+
maxAnnualFeeValue,
|
|
34
|
+
annualIntroFeeValue,
|
|
35
|
+
annualIntroFeeTermValue,
|
|
36
|
+
})
|
|
37
|
+
.with(
|
|
38
|
+
{ annualIntroFeeValue: P.not(undefined) },
|
|
39
|
+
({
|
|
40
|
+
annualIntroFeeValue,
|
|
41
|
+
annualIntroFeeTermValue,
|
|
42
|
+
minAnnualFeeValue,
|
|
43
|
+
maxAnnualFeeValue,
|
|
44
|
+
}) => {
|
|
45
|
+
const postIntroFee = formatRange(
|
|
46
|
+
minAnnualFeeValue,
|
|
47
|
+
maxAnnualFeeValue,
|
|
48
|
+
"amount"
|
|
49
|
+
);
|
|
50
|
+
return `${formatAmount(
|
|
51
|
+
annualIntroFeeValue
|
|
52
|
+
)} for ${annualIntroFeeTermValue} years, then ${postIntroFee}`;
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
.with(
|
|
56
|
+
{
|
|
57
|
+
minAnnualFeeValue: P.not(undefined),
|
|
58
|
+
maxAnnualFeeValue: P.not(undefined),
|
|
59
|
+
},
|
|
60
|
+
({ minAnnualFeeValue, maxAnnualFeeValue }) => {
|
|
61
|
+
if (minAnnualFeeValue === maxAnnualFeeValue) {
|
|
62
|
+
return formatAmount(minAnnualFeeValue, raw);
|
|
63
|
+
}
|
|
64
|
+
return formatRange(minAnnualFeeValue, maxAnnualFeeValue, "amount");
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
.with({ minAnnualFeeValue: P.not(undefined) }, ({ minAnnualFeeValue }) =>
|
|
68
|
+
formatAmount(minAnnualFeeValue)
|
|
69
|
+
)
|
|
70
|
+
.with({ maxAnnualFeeValue: P.not(undefined) }, ({ maxAnnualFeeValue }) =>
|
|
71
|
+
formatAmount(maxAnnualFeeValue)
|
|
72
|
+
)
|
|
73
|
+
.otherwise(() => "See Terms");
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const annualFee =
|
|
77
|
+
(offer: BaseOffer) =>
|
|
78
|
+
({
|
|
79
|
+
label,
|
|
80
|
+
minAnnualFeeField,
|
|
81
|
+
maxAnnualFeeField,
|
|
82
|
+
annualIntroFeeField,
|
|
83
|
+
annualIntroFeeTermField,
|
|
84
|
+
raw = false,
|
|
85
|
+
}: AnnualFeeStat): StatElementProps => {
|
|
86
|
+
const minAnnualFeeValue = get<number>(offer, minAnnualFeeField);
|
|
87
|
+
const maxAnnualFeeValue = get<number>(offer, maxAnnualFeeField);
|
|
88
|
+
const annualIntroFeeValue = get<number>(offer, annualIntroFeeField);
|
|
89
|
+
const annualIntroFeeTermValue = get<number>(offer, annualIntroFeeTermField);
|
|
90
|
+
|
|
91
|
+
const content = determineContent({
|
|
92
|
+
minAnnualFeeValue,
|
|
93
|
+
maxAnnualFeeValue,
|
|
94
|
+
annualIntroFeeValue,
|
|
95
|
+
annualIntroFeeTermValue,
|
|
96
|
+
raw,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
label,
|
|
101
|
+
content,
|
|
102
|
+
};
|
|
103
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// import { describe, expect, it } from "vitest";
|
|
2
|
+
// import { type BooleanStat, fromBooleanStat } from "./boolean";
|
|
3
|
+
|
|
4
|
+
// describe("fromBooleanStat", () => {
|
|
5
|
+
// it.each([
|
|
6
|
+
// [
|
|
7
|
+
// { isAvailable: true },
|
|
8
|
+
// { format: "boolean", label: "Availability", fieldName: "isAvailable" },
|
|
9
|
+
// { label: "Availability", content: "True" },
|
|
10
|
+
// ],
|
|
11
|
+
// [
|
|
12
|
+
// { isAvailable: false },
|
|
13
|
+
// { format: "boolean", label: "Availability", fieldName: "isAvailable" },
|
|
14
|
+
// { label: "Availability", content: "False" },
|
|
15
|
+
// ],
|
|
16
|
+
// [
|
|
17
|
+
// { isAvailable: true },
|
|
18
|
+
// {
|
|
19
|
+
// format: "boolean",
|
|
20
|
+
// label: "Availability",
|
|
21
|
+
// fieldName: "isAvailable",
|
|
22
|
+
// trueValue: "In Stock",
|
|
23
|
+
// },
|
|
24
|
+
// { label: "Availability", content: "In Stock" },
|
|
25
|
+
// ],
|
|
26
|
+
// [
|
|
27
|
+
// { isAvailable: false },
|
|
28
|
+
// {
|
|
29
|
+
// format: "boolean",
|
|
30
|
+
// label: "Availability",
|
|
31
|
+
// fieldName: "isAvailable",
|
|
32
|
+
// falseValue: "Out of Stock",
|
|
33
|
+
// },
|
|
34
|
+
// { label: "Availability", content: "Out of Stock" },
|
|
35
|
+
// ],
|
|
36
|
+
// [
|
|
37
|
+
// {},
|
|
38
|
+
// { format: "boolean", label: "Availability", fieldName: "isAvailable" },
|
|
39
|
+
// { label: "Availability", content: "False" },
|
|
40
|
+
// ],
|
|
41
|
+
// [
|
|
42
|
+
// {},
|
|
43
|
+
// {
|
|
44
|
+
// format: "boolean",
|
|
45
|
+
// label: "Availability",
|
|
46
|
+
// fieldName: "isAvailable",
|
|
47
|
+
// falseValue: "Unavailable",
|
|
48
|
+
// },
|
|
49
|
+
// { label: "Availability", content: "Unavailable" },
|
|
50
|
+
// ],
|
|
51
|
+
// ])(
|
|
52
|
+
// "should return the correct content for offer %j and stat %j",
|
|
53
|
+
// (offer, stats, expected) => {
|
|
54
|
+
// const result = fromBooleanStat(offer as BaseOffer)(stats as BooleanStat);
|
|
55
|
+
// expect(result).toEqual(expected);
|
|
56
|
+
// }
|
|
57
|
+
// );
|
|
58
|
+
// });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { get } from "radash";
|
|
2
|
+
import type { StatElementProps } from "../types";
|
|
3
|
+
import type { BaseOffer } from "../../../types/offerCatalogSchema";
|
|
4
|
+
|
|
5
|
+
export type BooleanStat = {
|
|
6
|
+
format: "boolean";
|
|
7
|
+
label: string;
|
|
8
|
+
fieldName: string;
|
|
9
|
+
trueValue?: string;
|
|
10
|
+
falseValue?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const fromBooleanStat =
|
|
14
|
+
(offer: BaseOffer) =>
|
|
15
|
+
({
|
|
16
|
+
label,
|
|
17
|
+
fieldName,
|
|
18
|
+
falseValue,
|
|
19
|
+
trueValue,
|
|
20
|
+
}: BooleanStat): StatElementProps => {
|
|
21
|
+
const booleanValue = get(offer, fieldName, false);
|
|
22
|
+
|
|
23
|
+
const content = booleanValue
|
|
24
|
+
? (trueValue ?? "True")
|
|
25
|
+
: (falseValue ?? "False");
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
label,
|
|
29
|
+
content,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// import type { BaseOffer } from '@capabilities/offer-catalog'
|
|
2
|
+
// import { describe, expect, it } from 'vitest'
|
|
3
|
+
// import { fromCommonStat } from './common'
|
|
4
|
+
|
|
5
|
+
// describe('fromCommonStat', () => {
|
|
6
|
+
// it.each([
|
|
7
|
+
// [{ title: 'special offer' }, 'Offer Title', 'special offer'],
|
|
8
|
+
// [{}, 'Missing Field', ''],
|
|
9
|
+
// ])('should return the correct content for offer %j', (offer, label, content) => {
|
|
10
|
+
// const result = fromCommonStat(offer as unknown as BaseOffer)({
|
|
11
|
+
// label,
|
|
12
|
+
// fieldName: 'title',
|
|
13
|
+
// format: 'common',
|
|
14
|
+
// })
|
|
15
|
+
// expect(result).toEqual({
|
|
16
|
+
// label,
|
|
17
|
+
// content,
|
|
18
|
+
// })
|
|
19
|
+
// })
|
|
20
|
+
|
|
21
|
+
// it.each([
|
|
22
|
+
// [{ title: 'special offer' }, 'Static Value', 'Special offer'],
|
|
23
|
+
// [{ title: 'limited time only' }, 'Description', 'Limited time only'],
|
|
24
|
+
// ])(
|
|
25
|
+
// 'should return the correct content for offer %j and capitalized',
|
|
26
|
+
// (offer, label, content) => {
|
|
27
|
+
// const result = fromCommonStat(offer as unknown as BaseOffer)({
|
|
28
|
+
// label,
|
|
29
|
+
// fieldName: 'title',
|
|
30
|
+
// format: 'common',
|
|
31
|
+
// capitalized: true,
|
|
32
|
+
// })
|
|
33
|
+
// expect(result).toEqual({
|
|
34
|
+
// label,
|
|
35
|
+
// content,
|
|
36
|
+
// })
|
|
37
|
+
// },
|
|
38
|
+
// )
|
|
39
|
+
|
|
40
|
+
// it.each([
|
|
41
|
+
// [{ score: 600 }, '600'],
|
|
42
|
+
// [{ score: undefined }, 'No minimum'],
|
|
43
|
+
// ])(
|
|
44
|
+
// 'should return the correct content for offer %j with the default value and fieldName',
|
|
45
|
+
// (offer, content) => {
|
|
46
|
+
// const result = fromCommonStat(offer as unknown as BaseOffer)({
|
|
47
|
+
// label: 'Minimum Credit Score',
|
|
48
|
+
// fieldName: 'score',
|
|
49
|
+
// format: 'common',
|
|
50
|
+
// defaultValue: 'No minimum',
|
|
51
|
+
// capitalized: true,
|
|
52
|
+
// })
|
|
53
|
+
|
|
54
|
+
// expect(result).toEqual({
|
|
55
|
+
// label: 'Minimum Credit Score',
|
|
56
|
+
// content,
|
|
57
|
+
// })
|
|
58
|
+
// },
|
|
59
|
+
// )
|
|
60
|
+
// })
|