@moneylion/react-native-offer-carousel 1.0.0 → 1.0.2
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/builder/builder.js +356 -0
- package/lib/commonjs/builder/builder.js.map +1 -0
- package/lib/commonjs/builder/config/types.js +2 -0
- package/lib/commonjs/builder/config/types.js.map +1 -0
- package/lib/commonjs/builder/index.js +28 -0
- package/lib/commonjs/builder/index.js.map +1 -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 +141 -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/VideoContent.js +35 -37
- package/lib/commonjs/components/Cards/VideosCard/VideoContent.js.map +1 -1
- 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/DynamicOffers/DynamicOffers.js +1 -1
- package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js +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/builder/builder.js +350 -0
- package/lib/module/builder/builder.js.map +1 -0
- package/lib/module/builder/config/types.js +2 -0
- package/lib/module/builder/config/types.js.map +1 -0
- package/lib/module/builder/index.js +3 -0
- package/lib/module/builder/index.js.map +1 -0
- 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 +133 -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/VideoContent.js +35 -30
- package/lib/module/components/Cards/VideosCard/VideoContent.js.map +1 -1
- 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/DynamicOffers/DynamicOffers.js +1 -1
- package/lib/module/components/DynamicOffers/DynamicOffers.js.map +1 -1
- package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js +1 -1
- package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.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/src/builder/builder.d.ts.map +1 -0
- package/lib/typescript/src/builder/config/types.d.ts.map +1 -0
- package/lib/typescript/src/builder/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +1 -0
- 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/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/Cards/VideosCard/VideoContent.d.ts +0 -8
- package/lib/typescript/src/components/Cards/VideosCard/VideoContent.d.ts.map +1 -1
- 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 +2 -2
- 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 +2 -2
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts +2 -2
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts +3 -3
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts +2 -2
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts +4 -4
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts +2 -2
- 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 -7
- package/src/builder/builder.ts +500 -0
- package/src/builder/config/types.ts +107 -0
- package/src/builder/index.ts +2 -0
- 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 +174 -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/VideoContent.tsx +32 -34
- 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/DynamicOffers.tsx +1 -1
- package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +2 -2
- package/src/components/DynamicOffers/Render/FallbackOfferTemplate.tsx +1 -1
- package/src/components/DynamicOffers/Render/Offer.tsx +2 -2
- package/src/components/Layouts/CreditCardOfferCard/index.tsx +2 -2
- package/src/components/Layouts/CreditCardOfferCard/statsBuilder.tsx +3 -3
- package/src/components/Layouts/DefaultOfferCard/index.tsx +2 -2
- package/src/components/Layouts/DefaultOfferCard/statsBuilder.tsx +3 -3
- package/src/components/Layouts/HeadlineWithDescriptionCard/index.tsx +2 -2
- 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/builder/builder.d.ts.map +0 -1
- package/lib/typescript/builder/config/types.d.ts.map +0 -1
- package/lib/typescript/builder/index.d.ts.map +0 -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/{builder → src/builder}/builder.d.ts +0 -0
- /package/lib/typescript/{builder → src/builder}/config/types.d.ts +0 -0
- /package/lib/typescript/{builder → src/builder}/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/checkVisualEligibility.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/createDerivedBrands.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/types.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
package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
// import type { BaseOffer } from '@capabilities/offer-catalog'
|
|
2
|
+
// import { describe, expect, it, vi } from 'vitest'
|
|
3
|
+
// import {
|
|
4
|
+
// type RangeCurrencyOrBasisStat,
|
|
5
|
+
// fromRangeCurrencyOrBasisStat,
|
|
6
|
+
// } from './currencyOrBasis'
|
|
7
|
+
|
|
8
|
+
// const cashAdvanceOffer: BaseOffer = {
|
|
9
|
+
// productVersions: [1],
|
|
10
|
+
// descriptionPoints: [
|
|
11
|
+
// 'Get approved instantly* for a Cash Advance from $10 to $300',
|
|
12
|
+
// 'Pay no interest or late fees — there’s no credit check either',
|
|
13
|
+
// 'Find out how much you qualify for now',
|
|
14
|
+
// ],
|
|
15
|
+
// fastTransferFeeBasisPointsMin: 0,
|
|
16
|
+
// uuid: '952c00ee-c1ab-4f1e-91ba-06d1a2d53ab1',
|
|
17
|
+
// amountCentsMax: 30000,
|
|
18
|
+
// createdAt: '2024-09-23T07:38:25.339782Z',
|
|
19
|
+
// internalName: 'Empower - Cash Advance',
|
|
20
|
+
// unmonetizedUrl: 'https://empower.me/cashadvance/',
|
|
21
|
+
// recommendationScore: 1,
|
|
22
|
+
// monetizedUrl:
|
|
23
|
+
// 'https://empower.onelink.me/GQnh/snwhc1rs?af_sub1=[LEAD_UUID]&af_sub2=[COMPANY_UUID]&af_sub4=network',
|
|
24
|
+
// headline: 'Top-rated Empower app delivers up to $300 Cash Advances*',
|
|
25
|
+
// productType: 'CashAdvance',
|
|
26
|
+
// updatedAt: '2024-09-23T07:38:25.339782Z',
|
|
27
|
+
// monthlyFeeCentsMin: 800,
|
|
28
|
+
// fastTransferFeeCentsMax: 0,
|
|
29
|
+
// version: 2,
|
|
30
|
+
// url: 'https://offers.moneylion.com/ref/ee0e415f-ca65-440b-b9c1-301e25089a1f',
|
|
31
|
+
// demandSubAccountUuid: '1fb97335-7793-4fab-90f2-be5f8b0bc29e',
|
|
32
|
+
// legalLanguage:
|
|
33
|
+
// '*Not everyone will qualify for a Cash Advance offer. Offer amounts range from $10 - $300. As of 3/31/2024, the average offer amount is $145. Instant delivery fees may apply. See Terms.',
|
|
34
|
+
// fastTransferFeeBasisPointsMax: 0,
|
|
35
|
+
// fastTransferFeeCentsMin: 0,
|
|
36
|
+
// productDisplayName: 'Cash Advance',
|
|
37
|
+
// monthlyFeeCentsMax: 800,
|
|
38
|
+
// amountCentsMin: 1000,
|
|
39
|
+
// demandSubAccountImageUrl:
|
|
40
|
+
// 'https://s3.amazonaws.com/images.evenfinancial.com/logos/dev/empower_thrive_-_cpa-425-wtxnb6m5.svg',
|
|
41
|
+
// status: 'active',
|
|
42
|
+
// demandSubAccountDisplayName: 'Empower Thrive',
|
|
43
|
+
// isMonetized: true,
|
|
44
|
+
// financialInstitutionUuid: '1fb97335-7793-4fab-90f2-be5f8b0bc29e',
|
|
45
|
+
// financialInstitutionImageUrl:
|
|
46
|
+
// 'https://s3.amazonaws.com/images.evenfinancial.com/logos/dev/empower_thrive_-_cpa-425-wtxnb6m5.svg',
|
|
47
|
+
// financialInstitutionDisplayName: 'Empower Thrive',
|
|
48
|
+
// }
|
|
49
|
+
|
|
50
|
+
// describe('fromRangeCurrencyOrBasisStat', () => {
|
|
51
|
+
// const label = 'Test Label'
|
|
52
|
+
// const options: RangeCurrencyOrBasisStat = {
|
|
53
|
+
// format: 'rangeCurrencyOrBasis',
|
|
54
|
+
// label,
|
|
55
|
+
// initialFieldNameCurrency: 'monthlyFeeCentsMin',
|
|
56
|
+
// endFieldNameCurrency: 'monthlyFeeCentsMax',
|
|
57
|
+
// initialFieldNameBasisPoints: 'fastTransferFeeBasisPointsMin',
|
|
58
|
+
// endFieldNameBasisPoints: 'fastTransferFeeBasisPointsMax',
|
|
59
|
+
// }
|
|
60
|
+
|
|
61
|
+
// // Mock the `get` function from 'radash'
|
|
62
|
+
// vi.mock('radash', () => ({
|
|
63
|
+
// get: (obj: any, path: string, defaultValue?: any) => {
|
|
64
|
+
// const value = obj[path]
|
|
65
|
+
// return value !== undefined ? value : defaultValue
|
|
66
|
+
// },
|
|
67
|
+
// }))
|
|
68
|
+
|
|
69
|
+
// vi.mock('@capabilities/offer-catalog', () => {
|
|
70
|
+
// const mockFormatRange = (
|
|
71
|
+
// value1: number | undefined,
|
|
72
|
+
// value2: number | undefined,
|
|
73
|
+
// type: 'amount' | 'percentage',
|
|
74
|
+
// ) => {
|
|
75
|
+
// if (value1 == null && value2 == null) return 'N/A'
|
|
76
|
+
// if (value1 === 0 && value2 === 0) return 'FREE'
|
|
77
|
+
// if (value1 != null && value2 != null && value1 === value2)
|
|
78
|
+
// return `${value1} ${type}`
|
|
79
|
+
// if (value1 != null && value2 != null) return `${value1}-${value2} ${type}`
|
|
80
|
+
// if (value1 != null) return `${value1} ${type}`
|
|
81
|
+
// if (value2 != null) return `${value2} ${type}`
|
|
82
|
+
// return 'N/A'
|
|
83
|
+
// }
|
|
84
|
+
|
|
85
|
+
// return {
|
|
86
|
+
// formatRange: mockFormatRange,
|
|
87
|
+
// }
|
|
88
|
+
// })
|
|
89
|
+
|
|
90
|
+
// it('returns formatted content based on cashAdvanceOffer data', () => {
|
|
91
|
+
// const result = fromRangeCurrencyOrBasisStat(cashAdvanceOffer)(options)
|
|
92
|
+
// expect(result).toEqual({ label, content: '800 amount' })
|
|
93
|
+
// })
|
|
94
|
+
|
|
95
|
+
// it('returns FREE when all relevant values are zero in cashAdvanceOffer', () => {
|
|
96
|
+
// const offerWithZeros = {
|
|
97
|
+
// ...cashAdvanceOffer,
|
|
98
|
+
// monthlyFeeCentsMin: 0,
|
|
99
|
+
// monthlyFeeCentsMax: 0,
|
|
100
|
+
// fastTransferFeeBasisPointsMin: 0,
|
|
101
|
+
// fastTransferFeeBasisPointsMax: 0,
|
|
102
|
+
// }
|
|
103
|
+
// const result = fromRangeCurrencyOrBasisStat(offerWithZeros)(options)
|
|
104
|
+
// expect(result).toEqual({ label, content: 'FREE' })
|
|
105
|
+
// })
|
|
106
|
+
|
|
107
|
+
// it('returns N/A when all relevant values are undefined in cashAdvanceOffer', () => {
|
|
108
|
+
// const offerWithUndefineds = {
|
|
109
|
+
// ...cashAdvanceOffer,
|
|
110
|
+
// monthlyFeeCentsMin: undefined,
|
|
111
|
+
// monthlyFeeCentsMax: undefined,
|
|
112
|
+
// fastTransferFeeBasisPointsMin: undefined,
|
|
113
|
+
// fastTransferFeeBasisPointsMax: undefined,
|
|
114
|
+
// }
|
|
115
|
+
// const result = fromRangeCurrencyOrBasisStat(offerWithUndefineds)(options)
|
|
116
|
+
// expect(result).toEqual({ label, content: 'N/A' })
|
|
117
|
+
// })
|
|
118
|
+
|
|
119
|
+
// it('returns basis points range when currency values are zero', () => {
|
|
120
|
+
// const offerWithZeroCurrency = {
|
|
121
|
+
// ...cashAdvanceOffer,
|
|
122
|
+
// monthlyFeeCentsMin: 0,
|
|
123
|
+
// monthlyFeeCentsMax: 0,
|
|
124
|
+
// fastTransferFeeBasisPointsMin: 100,
|
|
125
|
+
// fastTransferFeeBasisPointsMax: 200,
|
|
126
|
+
// }
|
|
127
|
+
// const result = fromRangeCurrencyOrBasisStat(offerWithZeroCurrency)(options)
|
|
128
|
+
// expect(result).toEqual({ label, content: '100-200 percentage' })
|
|
129
|
+
// })
|
|
130
|
+
|
|
131
|
+
// it('returns both currency and basis points ranges when both are defined', () => {
|
|
132
|
+
// const offerWithAllValues = {
|
|
133
|
+
// ...cashAdvanceOffer,
|
|
134
|
+
// monthlyFeeCentsMin: 500,
|
|
135
|
+
// monthlyFeeCentsMax: 1000,
|
|
136
|
+
// fastTransferFeeBasisPointsMin: 50,
|
|
137
|
+
// fastTransferFeeBasisPointsMax: 75,
|
|
138
|
+
// }
|
|
139
|
+
// const result = fromRangeCurrencyOrBasisStat(offerWithAllValues)(options)
|
|
140
|
+
// expect(result).toEqual({
|
|
141
|
+
// label,
|
|
142
|
+
// content: '500-1000 amount or 50-75 percentage',
|
|
143
|
+
// })
|
|
144
|
+
// })
|
|
145
|
+
|
|
146
|
+
// it('handles single value ranges for currency in cashAdvanceOffer', () => {
|
|
147
|
+
// const offerWithSingleCurrency = {
|
|
148
|
+
// ...cashAdvanceOffer,
|
|
149
|
+
// monthlyFeeCentsMin: 600,
|
|
150
|
+
// monthlyFeeCentsMax: 600,
|
|
151
|
+
// }
|
|
152
|
+
// const result = fromRangeCurrencyOrBasisStat(offerWithSingleCurrency)(options)
|
|
153
|
+
// expect(result).toEqual({ label, content: '600 amount' })
|
|
154
|
+
// })
|
|
155
|
+
|
|
156
|
+
// it('handles missing end values gracefully in cashAdvanceOffer', () => {
|
|
157
|
+
// const offerWithMissingEndValues = {
|
|
158
|
+
// ...cashAdvanceOffer,
|
|
159
|
+
// monthlyFeeCentsMin: 700,
|
|
160
|
+
// monthlyFeeCentsMax: undefined,
|
|
161
|
+
// fastTransferFeeBasisPointsMin: 25,
|
|
162
|
+
// fastTransferFeeBasisPointsMax: undefined,
|
|
163
|
+
// }
|
|
164
|
+
// const result = fromRangeCurrencyOrBasisStat(offerWithMissingEndValues)(options)
|
|
165
|
+
// expect(result).toEqual({
|
|
166
|
+
// label,
|
|
167
|
+
// content: '700 amount or 25 percentage',
|
|
168
|
+
// })
|
|
169
|
+
// })
|
|
170
|
+
|
|
171
|
+
// it('excludes FREE or N/A from content if formatRange returns them', () => {
|
|
172
|
+
// const offerWithFreeCurrency = {
|
|
173
|
+
// ...cashAdvanceOffer,
|
|
174
|
+
// monthlyFeeCentsMin: 0,
|
|
175
|
+
// monthlyFeeCentsMax: 0,
|
|
176
|
+
// fastTransferFeeBasisPointsMin: 15,
|
|
177
|
+
// fastTransferFeeBasisPointsMax: 15,
|
|
178
|
+
// }
|
|
179
|
+
// const result = fromRangeCurrencyOrBasisStat(offerWithFreeCurrency)(options)
|
|
180
|
+
// expect(result).toEqual({ label, content: '15 percentage' })
|
|
181
|
+
// })
|
|
182
|
+
|
|
183
|
+
// it('prefers basis points when currency comparison is FREE or N/A', () => {
|
|
184
|
+
// const offerWithNoCurrency = {
|
|
185
|
+
// ...cashAdvanceOffer,
|
|
186
|
+
// monthlyFeeCentsMin: undefined,
|
|
187
|
+
// monthlyFeeCentsMax: undefined,
|
|
188
|
+
// fastTransferFeeBasisPointsMin: 20,
|
|
189
|
+
// fastTransferFeeBasisPointsMax: 25,
|
|
190
|
+
// }
|
|
191
|
+
// const result = fromRangeCurrencyOrBasisStat(offerWithNoCurrency)(options)
|
|
192
|
+
// expect(result).toEqual({ label, content: '20-25 percentage' })
|
|
193
|
+
// })
|
|
194
|
+
|
|
195
|
+
// it('returns N/A when formatRange returns N/A for both currency and basis points', () => {
|
|
196
|
+
// const offerWithNoValues = {
|
|
197
|
+
// ...cashAdvanceOffer,
|
|
198
|
+
// monthlyFeeCentsMin: undefined,
|
|
199
|
+
// monthlyFeeCentsMax: undefined,
|
|
200
|
+
// fastTransferFeeBasisPointsMin: undefined,
|
|
201
|
+
// fastTransferFeeBasisPointsMax: undefined,
|
|
202
|
+
// }
|
|
203
|
+
// const result = fromRangeCurrencyOrBasisStat(offerWithNoValues)(options)
|
|
204
|
+
// expect(result).toEqual({ label, content: 'N/A' })
|
|
205
|
+
// })
|
|
206
|
+
// })
|
|
207
|
+
//# sourceMappingURL=currencyOrBasis.spec.js.map
|
package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { get } from "radash";
|
|
2
|
+
export const fromFreeTrialStat = offer => ({
|
|
3
|
+
label,
|
|
4
|
+
freeTrialField = "freeTrialDays"
|
|
5
|
+
}) => {
|
|
6
|
+
const freeTrialDays = get(offer, freeTrialField, 0);
|
|
7
|
+
const content = freeTrialDays > 0 ? `${freeTrialDays} Days` : "No";
|
|
8
|
+
return {
|
|
9
|
+
label,
|
|
10
|
+
content
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=freeTrialDays.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["get","fromFreeTrialStat","offer","label","freeTrialField","freeTrialDays","content"],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.ts"],"mappings":"AAAA,SAASA,GAAG,QAAQ,QAAQ;AAU5B,OAAO,MAAMC,iBAAiB,GAC5BC,KAAgB,IACjB,CAAC;EACAC,KAAK;EACLC,cAAc,GAAG;AACH,CAAC,KAAuB;EACtC,MAAMC,aAAa,GAAGL,GAAG,CAASE,KAAK,EAAEE,cAAc,EAAE,CAAC,CAAC;EAE3D,MAAME,OAAO,GAAGD,aAAa,GAAG,CAAC,GAAG,GAAGA,aAAa,OAAO,GAAG,IAAI;EAElE,OAAO;IACNF,KAAK;IACLG;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// import type { BaseOffer } from '@capabilities/offer-catalog'
|
|
2
|
+
// import { describe, expect, it } from 'vitest'
|
|
3
|
+
// import { fromFreeTrialStat } from './freeTrialDays' // Update this to the correct file path
|
|
4
|
+
|
|
5
|
+
// describe('fromFreeTrialStat', () => {
|
|
6
|
+
// it.each([
|
|
7
|
+
// [{ freeTrialDays: 14 }, 'Free Trial', '14 Days'],
|
|
8
|
+
// [{ freeTrialDays: 0 }, 'Free Trial', 'No'],
|
|
9
|
+
// [{}, 'Free Trial', 'No'],
|
|
10
|
+
// [{ freeTrialDays: undefined }, 'Free Trial', 'No'],
|
|
11
|
+
// [{ freeTrialDays: 30 }, 'Try for Free', '30 Days'],
|
|
12
|
+
// ])('should return the correct content for offer %j', (offer, label, content) => {
|
|
13
|
+
// const result = fromFreeTrialStat(offer as BaseOffer)({
|
|
14
|
+
// label,
|
|
15
|
+
// format: 'freeTrial',
|
|
16
|
+
// })
|
|
17
|
+
// expect(result).toEqual({
|
|
18
|
+
// label,
|
|
19
|
+
// content,
|
|
20
|
+
// })
|
|
21
|
+
// })
|
|
22
|
+
// })
|
|
23
|
+
//# sourceMappingURL=freeTrialDays.spec.js.map
|
package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.ts"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { get } from "radash";
|
|
2
|
+
import { formatStringListWithAnd } from "../../formatUtils";
|
|
3
|
+
export const fromListStringWithAnd = offer => ({
|
|
4
|
+
label,
|
|
5
|
+
fieldName
|
|
6
|
+
}) => {
|
|
7
|
+
const value = get(offer, fieldName, undefined);
|
|
8
|
+
const content = formatStringListWithAnd(value);
|
|
9
|
+
return {
|
|
10
|
+
label,
|
|
11
|
+
content
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=fromListStringWithAnd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["get","formatStringListWithAnd","fromListStringWithAnd","offer","label","fieldName","value","undefined","content"],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.ts"],"mappings":"AACA,SAASA,GAAG,QAAQ,QAAQ;AAG5B,SAASC,uBAAuB,QAAQ,mBAAmB;AAQ3D,OAAO,MAAMC,qBAAqB,GAChCC,KAAgB,IACjB,CAAC;EAAEC,KAAK;EAAEC;AAAiC,CAAC,KAAuB;EAClE,MAAMC,KAAK,GAAGN,GAAG,CAAWG,KAAK,EAAEE,SAAS,EAAEE,SAAS,CAAC;EAExD,MAAMC,OAAO,GAAGP,uBAAuB,CAACK,KAAK,CAAC;EAE9C,OAAO;IACNF,KAAK;IACLI;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// import { describe, expect, it } from "vitest";
|
|
2
|
+
// import type { BaseOffer } from "../../../types/offerCatalogSchema";
|
|
3
|
+
// import { fromListStringWithAnd } from "./fromListStringWithAnd";
|
|
4
|
+
|
|
5
|
+
// describe("creditBurauReports", () => {
|
|
6
|
+
// it.each([
|
|
7
|
+
// [
|
|
8
|
+
// { creditBureauReporting: ["Experian", "Equifax", "TransUnion"] },
|
|
9
|
+
// "Credit Bureau Reporting",
|
|
10
|
+
// "Experian, Equifax & TransUnion",
|
|
11
|
+
// ],
|
|
12
|
+
// [
|
|
13
|
+
// { creditBureauReporting: ["Experian", "Equifax"] },
|
|
14
|
+
// "Credit Bureau Reporting",
|
|
15
|
+
// "Experian & Equifax",
|
|
16
|
+
// ],
|
|
17
|
+
// [
|
|
18
|
+
// { creditBureauReporting: ["Experian"] },
|
|
19
|
+
// "Credit Bureau Reporting",
|
|
20
|
+
// "Experian",
|
|
21
|
+
// ],
|
|
22
|
+
// [{ creditBureauReporting: [] }, "Credit Bureau Reporting", "N/A"],
|
|
23
|
+
// [{ creditBureauReporting: undefined }, "Credit Bureau Reporting", "N/A"],
|
|
24
|
+
// ])(
|
|
25
|
+
// "should return the correct content for offer %j",
|
|
26
|
+
// (offer, label, content) => {
|
|
27
|
+
// const result = fromListStringWithAnd(offer as unknown as BaseOffer)({
|
|
28
|
+
// // label,
|
|
29
|
+
// format: "listStringWithAnd",
|
|
30
|
+
// fieldName: "creditBureauReporting",
|
|
31
|
+
// });
|
|
32
|
+
// expect(result).toEqual({
|
|
33
|
+
// label,
|
|
34
|
+
// content,
|
|
35
|
+
// });
|
|
36
|
+
// }
|
|
37
|
+
// );
|
|
38
|
+
// });
|
|
39
|
+
//# sourceMappingURL=fromListStringWithAnd.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.ts"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './boolean';
|
|
2
|
+
export * from './common';
|
|
3
|
+
export * from './currency';
|
|
4
|
+
export * from './percentage';
|
|
5
|
+
export * from './freeTrialDays';
|
|
6
|
+
export * from './fromListStringWithAnd';
|
|
7
|
+
export * from './monthlyOrAnnualCurrency';
|
|
8
|
+
export * from './rangeCurrency';
|
|
9
|
+
export * from './rangeMonths';
|
|
10
|
+
export * from './fromListStringWithAnd';
|
|
11
|
+
export * from './creditBureaus';
|
|
12
|
+
export * from './rangeCurrencyByTime';
|
|
13
|
+
export * from './currencyOrBasis';
|
|
14
|
+
export * from './rangePercent';
|
|
15
|
+
export * from './recommendedCredit';
|
|
16
|
+
export * from './rewardsDisplay';
|
|
17
|
+
export * from './purchaseApr';
|
|
18
|
+
export * from './annualFee';
|
|
19
|
+
export * from './rangeCurrencyUnabbreviated';
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/index.ts"],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,iBAAiB;AAC/B,cAAc,yBAAyB;AACvC,cAAc,2BAA2B;AACzC,cAAc,iBAAiB;AAC/B,cAAc,eAAe;AAC7B,cAAc,yBAAyB;AACvC,cAAc,iBAAiB;AAC/B,cAAc,uBAAuB;AACrC,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,eAAe;AAC7B,cAAc,aAAa;AAC3B,cAAc,8BAA8B","ignoreList":[]}
|
package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { get } from "radash";
|
|
2
|
+
import { formatAmount } from "../../formatUtils";
|
|
3
|
+
export const fromMonthlyOrAnnualCurrencyStat = offer => ({
|
|
4
|
+
label,
|
|
5
|
+
annualFieldName,
|
|
6
|
+
monthlyFieldName,
|
|
7
|
+
emptyValueContent = "N/A"
|
|
8
|
+
}) => {
|
|
9
|
+
const monthlyValue = get(offer, monthlyFieldName, undefined);
|
|
10
|
+
const annualValue = get(offer, annualFieldName, undefined);
|
|
11
|
+
if (typeof monthlyValue === "undefined" && typeof annualValue === "undefined") return {
|
|
12
|
+
label,
|
|
13
|
+
content: emptyValueContent
|
|
14
|
+
};
|
|
15
|
+
if (monthlyValue === 0 && annualValue === 0) {
|
|
16
|
+
return {
|
|
17
|
+
label,
|
|
18
|
+
content: "FREE"
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const suffix = monthlyValue ? " / Month" : " / Year";
|
|
22
|
+
const content = `${formatAmount(monthlyValue ?? annualValue)}${suffix}`;
|
|
23
|
+
return {
|
|
24
|
+
label,
|
|
25
|
+
content
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=monthlyOrAnnualCurrency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["get","formatAmount","fromMonthlyOrAnnualCurrencyStat","offer","label","annualFieldName","monthlyFieldName","emptyValueContent","monthlyValue","undefined","annualValue","content","suffix"],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.ts"],"mappings":"AACA,SAASA,GAAG,QAAQ,QAAQ;AAG5B,SAASC,YAAY,QAAQ,mBAAmB;AAUhD,OAAO,MAAMC,+BAA+B,GAC1CC,KAAgB,IACjB,CAAC;EACAC,KAAK;EACLC,eAAe;EACfC,gBAAgB;EAChBC,iBAAiB,GAAG;AACQ,CAAC,KAAuB;EACpD,MAAMC,YAAY,GAAGR,GAAG,CACvBG,KAAK,EACLG,gBAAgB,EAChBG,SACD,CAAC;EACD,MAAMC,WAAW,GAAGV,GAAG,CACtBG,KAAK,EACLE,eAAe,EACfI,SACD,CAAC;EAED,IACC,OAAOD,YAAY,KAAK,WAAW,IACnC,OAAOE,WAAW,KAAK,WAAW,EAElC,OAAO;IAAEN,KAAK;IAAEO,OAAO,EAAEJ;EAAkB,CAAC;EAE7C,IAAIC,YAAY,KAAK,CAAC,IAAIE,WAAW,KAAK,CAAC,EAAE;IAC5C,OAAO;MAAEN,KAAK;MAAEO,OAAO,EAAE;IAAO,CAAC;EAClC;EAEA,MAAMC,MAAM,GAAGJ,YAAY,GAAG,UAAU,GAAG,SAAS;EAEpD,MAAMG,OAAO,GAAG,GAAGV,YAAY,CAACO,YAAY,IAAIE,WAAW,CAAC,GAAGE,MAAM,EAAE;EAEvE,OAAO;IACNR,KAAK;IACLO;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// import type { BaseOffer } from '@capabilities/offer-catalog'
|
|
2
|
+
// import { describe, expect, it } from 'vitest'
|
|
3
|
+
// import { fromMonthlyOrAnnualCurrencyStat } from './monthlyOrAnnualCurrency' // Update this to the correct file path
|
|
4
|
+
|
|
5
|
+
// describe('fromMonthlyOrAnnualCurrencyStat', () => {
|
|
6
|
+
// it.each([
|
|
7
|
+
// [{}, 'Price', 'N/A'],
|
|
8
|
+
// [{ monthlyPrice: 0, annualPrice: 0 }, 'Price', 'FREE'],
|
|
9
|
+
// [{ monthlyPrice: 1500 }, 'Price', '$15 / Month'],
|
|
10
|
+
// [{ annualPrice: 1200 }, 'Price', '$12 / Year'],
|
|
11
|
+
// [{ monthlyPrice: 200, annualPrice: 200 }, 'Price', '$2 / Month'],
|
|
12
|
+
// ])('should return the correct content for offer %j', (offer, label, content) => {
|
|
13
|
+
// const result = fromMonthlyOrAnnualCurrencyStat(offer as BaseOffer)({
|
|
14
|
+
// format: 'monthlyOrAnnualCurrency',
|
|
15
|
+
// label: 'Price',
|
|
16
|
+
// monthlyFieldName: 'monthlyPrice',
|
|
17
|
+
// annualFieldName: 'annualPrice',
|
|
18
|
+
// })
|
|
19
|
+
// expect(result).toEqual({
|
|
20
|
+
// label,
|
|
21
|
+
// content,
|
|
22
|
+
// })
|
|
23
|
+
// })
|
|
24
|
+
|
|
25
|
+
// it.each([
|
|
26
|
+
// [{}, 'Price', 'No value'],
|
|
27
|
+
// [{ monthlyPrice: 0, annualPrice: 0 }, 'Price', 'FREE'],
|
|
28
|
+
// ])('should return the correct content for offer %j', (offer, label, content) => {
|
|
29
|
+
// const result = fromMonthlyOrAnnualCurrencyStat(offer as BaseOffer)({
|
|
30
|
+
// format: 'monthlyOrAnnualCurrency',
|
|
31
|
+
// label: 'Price',
|
|
32
|
+
// emptyValueContent: 'No value',
|
|
33
|
+
// monthlyFieldName: 'monthlyPrice',
|
|
34
|
+
// annualFieldName: 'annualPrice',
|
|
35
|
+
// })
|
|
36
|
+
// expect(result).toEqual({
|
|
37
|
+
// label,
|
|
38
|
+
// content,
|
|
39
|
+
// })
|
|
40
|
+
// })
|
|
41
|
+
// })
|
|
42
|
+
//# sourceMappingURL=monthlyOrAnnualCurrency.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.ts"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { get } from "radash";
|
|
2
|
+
import { formatPercentage } from "../../formatUtils";
|
|
3
|
+
export const fromPercentageStat = offer => ({
|
|
4
|
+
label,
|
|
5
|
+
fieldName
|
|
6
|
+
}) => {
|
|
7
|
+
const value = get(offer, fieldName, undefined);
|
|
8
|
+
const content = formatPercentage(value);
|
|
9
|
+
return {
|
|
10
|
+
label,
|
|
11
|
+
content
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=percentage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["get","formatPercentage","fromPercentageStat","offer","label","fieldName","value","undefined","content"],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/percentage.ts"],"mappings":"AACA,SAASA,GAAG,QAAQ,QAAQ;AAG5B,SAASC,gBAAgB,QAAQ,mBAAmB;AAQpD,OAAO,MAAMC,kBAAkB,GAC7BC,KAAgB,IACjB,CAAC;EAAEC,KAAK;EAAEC;AAA0B,CAAC,KAAuB;EAC3D,MAAMC,KAAK,GAAGN,GAAG,CAAqBG,KAAK,EAAEE,SAAS,EAAEE,SAAS,CAAC;EAClE,MAAMC,OAAO,GAAGP,gBAAgB,CAACK,KAAK,CAAC;EAEvC,OAAO;IACNF,KAAK;IACLI;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// import type { BaseOffer } from '@capabilities/offer-catalog'
|
|
2
|
+
// import { describe, expect, it } from 'vitest'
|
|
3
|
+
// import { fromPercentageStat } from './percentage'
|
|
4
|
+
|
|
5
|
+
// describe('fromPercentageStat function', () => {
|
|
6
|
+
// it.each([
|
|
7
|
+
// [{}, 'Interest Rate', 'N/A'],
|
|
8
|
+
// [{ interestRate: undefined }, 'Interest Rate', 'N/A'],
|
|
9
|
+
// [{ interestRate: null }, 'Interest Rate', 'N/A'],
|
|
10
|
+
// [{ interestRate: 0 }, 'Interest Rate', '0%'],
|
|
11
|
+
// [{ interestRate: 50 }, 'Interest Rate', '0.5%'],
|
|
12
|
+
// [{ interestRate: 100 }, 'Interest Rate', '1%'],
|
|
13
|
+
// [{ interestRate: 123 }, 'Interest Rate', '1.23%'],
|
|
14
|
+
// [{ interestRate: 500 }, 'Interest Rate', '5%'],
|
|
15
|
+
// [{ interestRate: 750 }, 'Interest Rate', '7.5%'],
|
|
16
|
+
// [{ interestRate: 1000 }, 'Interest Rate', '10%'],
|
|
17
|
+
// [{ interestRate: 1234 }, 'Interest Rate', '12.34%'],
|
|
18
|
+
// [{ interestRate: 10000 }, 'Interest Rate', '100%'],
|
|
19
|
+
// ])('should return correct content for offer %j', (offer, label, expectedContent) => {
|
|
20
|
+
// const result = fromPercentageStat(offer as BaseOffer)({
|
|
21
|
+
// format: 'percentage',
|
|
22
|
+
// label,
|
|
23
|
+
// fieldName: 'interestRate',
|
|
24
|
+
// })
|
|
25
|
+
// expect(result).toEqual({
|
|
26
|
+
// label,
|
|
27
|
+
// content: expectedContent,
|
|
28
|
+
// })
|
|
29
|
+
// })
|
|
30
|
+
// })
|
|
31
|
+
//# sourceMappingURL=percentage.spec.js.map
|
package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.ts"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { get } from "radash";
|
|
2
|
+
import { P, match } from "ts-pattern";
|
|
3
|
+
import { formatRange } from "../../formatUtils";
|
|
4
|
+
/**
|
|
5
|
+
* Determine the content of the purchaseApr stat
|
|
6
|
+
* @param params {purchaseAprValue, minPurchaseAprValue, maxPurchaseAprValue}
|
|
7
|
+
* @returns {string}
|
|
8
|
+
* @example
|
|
9
|
+
* determineContent({ purchaseAprValue: '10%', minPurchaseAprValue: null, maxPurchaseAprValue: null })
|
|
10
|
+
* // returns '10%'
|
|
11
|
+
* determineContent({ purchaseAprValue: null, minPurchaseAprValue: 5, maxPurchaseAprValue: 10 })
|
|
12
|
+
* // returns '5% - 10%'
|
|
13
|
+
* determineContent({ purchaseAprValue: null, minPurchaseAprValue: null, maxPurchaseAprValue: null })
|
|
14
|
+
* // returns 'See Terms'
|
|
15
|
+
*/
|
|
16
|
+
const determineContent = ({
|
|
17
|
+
purchaseAprValue,
|
|
18
|
+
minPurchaseAprValue,
|
|
19
|
+
maxPurchaseAprValue
|
|
20
|
+
}) => {
|
|
21
|
+
return match({
|
|
22
|
+
purchaseAprValue,
|
|
23
|
+
minPurchaseAprValue,
|
|
24
|
+
maxPurchaseAprValue
|
|
25
|
+
}).with({
|
|
26
|
+
purchaseAprValue: P.not(undefined)
|
|
27
|
+
}, ({
|
|
28
|
+
purchaseAprValue
|
|
29
|
+
}) => purchaseAprValue).with({
|
|
30
|
+
minPurchaseAprValue: P.not(undefined),
|
|
31
|
+
maxPurchaseAprValue: P.not(undefined)
|
|
32
|
+
}, ({
|
|
33
|
+
minPurchaseAprValue,
|
|
34
|
+
maxPurchaseAprValue
|
|
35
|
+
}) => formatRange(minPurchaseAprValue, maxPurchaseAprValue, "percentage")).otherwise(() => "See Terms");
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Determine the label of the purchaseApr stat
|
|
40
|
+
* @param aprType {string}
|
|
41
|
+
* @param label {string}
|
|
42
|
+
* @returns {string}
|
|
43
|
+
*/
|
|
44
|
+
const determineLabel = (aprType, label) => {
|
|
45
|
+
return match(aprType).with("variable", () => "Variable APR:").with("fixed", () => "Fixed APR:").otherwise(() => label);
|
|
46
|
+
};
|
|
47
|
+
export const purchaseApr = offer => ({
|
|
48
|
+
label: defaultLabel,
|
|
49
|
+
purchaseAprTextField,
|
|
50
|
+
minPurchaseAprField,
|
|
51
|
+
maxPurchaseAprField,
|
|
52
|
+
aprTypeField
|
|
53
|
+
}) => {
|
|
54
|
+
const purchaseAprValue = get(offer, purchaseAprTextField);
|
|
55
|
+
const minPurchaseAprValue = get(offer, minPurchaseAprField);
|
|
56
|
+
const maxPurchaseAprValue = get(offer, maxPurchaseAprField);
|
|
57
|
+
const aprTypeValue = get(offer, aprTypeField);
|
|
58
|
+
const content = determineContent({
|
|
59
|
+
purchaseAprValue,
|
|
60
|
+
minPurchaseAprValue,
|
|
61
|
+
maxPurchaseAprValue
|
|
62
|
+
}).replace(/ Variable APR| Fixed APR/g, "");
|
|
63
|
+
const label = determineLabel(aprTypeValue, defaultLabel);
|
|
64
|
+
return {
|
|
65
|
+
label,
|
|
66
|
+
content
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=purchaseApr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["get","P","match","formatRange","determineContent","purchaseAprValue","minPurchaseAprValue","maxPurchaseAprValue","with","not","undefined","otherwise","determineLabel","aprType","label","purchaseApr","offer","defaultLabel","purchaseAprTextField","minPurchaseAprField","maxPurchaseAprField","aprTypeField","aprTypeValue","content","replace"],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.ts"],"mappings":"AAAA,SAASA,GAAG,QAAQ,QAAQ;AAC5B,SAASC,CAAC,EAAEC,KAAK,QAAQ,YAAY;AAErC,SAASC,WAAW,QAAQ,mBAAmB;AAY/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAGA,CAAC;EACzBC,gBAAgB;EAChBC,mBAAmB;EACnBC;AAKD,CAAC,KAAK;EACL,OAAOL,KAAK,CAAC;IAAEG,gBAAgB;IAAEC,mBAAmB;IAAEC;EAAoB,CAAC,CAAC,CAC1EC,IAAI,CACJ;IAAEH,gBAAgB,EAAEJ,CAAC,CAACQ,GAAG,CAACC,SAAS;EAAE,CAAC,EACtC,CAAC;IAAEL;EAAiB,CAAC,KAAKA,gBAC3B,CAAC,CACAG,IAAI,CACJ;IACCF,mBAAmB,EAAEL,CAAC,CAACQ,GAAG,CAACC,SAAS,CAAC;IACrCH,mBAAmB,EAAEN,CAAC,CAACQ,GAAG,CAACC,SAAS;EACrC,CAAC,EACD,CAAC;IAAEJ,mBAAmB;IAAEC;EAAoB,CAAC,KAC5CJ,WAAW,CAACG,mBAAmB,EAAEC,mBAAmB,EAAE,YAAY,CACpE,CAAC,CACAI,SAAS,CAAC,MAAM,WAAW,CAAC;AAC/B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAGA,CAACC,OAAe,EAAEC,KAAa,KAAK;EAC1D,OAAOZ,KAAK,CAACW,OAAO,CAAC,CACnBL,IAAI,CAAC,UAAU,EAAE,MAAM,eAAe,CAAC,CACvCA,IAAI,CAAC,OAAO,EAAE,MAAM,YAAY,CAAC,CACjCG,SAAS,CAAC,MAAMG,KAAK,CAAC;AACzB,CAAC;AAED,OAAO,MAAMC,WAAW,GACtBC,KAAgB,IACjB,CAAC;EACAF,KAAK,EAAEG,YAAY;EACnBC,oBAAoB;EACpBC,mBAAmB;EACnBC,mBAAmB;EACnBC;AACgB,CAAC,KAAuB;EACxC,MAAMhB,gBAAgB,GAAGL,GAAG,CAASgB,KAAK,EAAEE,oBAAoB,CAAC;EACjE,MAAMZ,mBAAmB,GAAGN,GAAG,CAASgB,KAAK,EAAEG,mBAAmB,CAAC;EACnE,MAAMZ,mBAAmB,GAAGP,GAAG,CAASgB,KAAK,EAAEI,mBAAmB,CAAC;EACnE,MAAME,YAAY,GAAGtB,GAAG,CAASgB,KAAK,EAAEK,YAAY,CAAC;EAErD,MAAME,OAAO,GAAGnB,gBAAgB,CAAC;IAChCC,gBAAgB;IAChBC,mBAAmB;IACnBC;EACD,CAAC,CAAC,CAACiB,OAAO,CAAC,2BAA2B,EAAE,EAAE,CAAC;EAE3C,MAAMV,KAAK,GAAGF,cAAc,CAACU,YAAY,EAAEL,YAAY,CAAC;EAExD,OAAO;IACNH,KAAK;IACLS;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// import type { BaseOffer } from '@capabilities/offer-catalog'
|
|
2
|
+
// import { describe, expect, it } from 'vitest'
|
|
3
|
+
// import { purchaseApr } from './purchaseApr'
|
|
4
|
+
|
|
5
|
+
// describe('purchaseApr', () => {
|
|
6
|
+
// it.each([
|
|
7
|
+
// [
|
|
8
|
+
// {
|
|
9
|
+
// purchaseApr: '10%',
|
|
10
|
+
// minPurchaseApr: null,
|
|
11
|
+
// maxPurchaseApr: null,
|
|
12
|
+
// aprType: 'fixed',
|
|
13
|
+
// },
|
|
14
|
+
// 'Fixed APR:',
|
|
15
|
+
// '10%',
|
|
16
|
+
// ],
|
|
17
|
+
// [
|
|
18
|
+
// {
|
|
19
|
+
// purchaseApr: '10%',
|
|
20
|
+
// minPurchaseApr: null,
|
|
21
|
+
// maxPurchaseApr: null,
|
|
22
|
+
// aprType: 'variable',
|
|
23
|
+
// },
|
|
24
|
+
// 'Variable APR:',
|
|
25
|
+
// '10%',
|
|
26
|
+
// ],
|
|
27
|
+
// [
|
|
28
|
+
// {
|
|
29
|
+
// purchaseApr: null,
|
|
30
|
+
// minPurchaseApr: 500,
|
|
31
|
+
// maxPurchaseApr: 1000,
|
|
32
|
+
// aprType: 'fixed',
|
|
33
|
+
// },
|
|
34
|
+
// 'Fixed APR:',
|
|
35
|
+
// '5% - 10%',
|
|
36
|
+
// ],
|
|
37
|
+
// [
|
|
38
|
+
// {
|
|
39
|
+
// purchaseApr: null,
|
|
40
|
+
// minPurchaseApr: null,
|
|
41
|
+
// maxPurchaseApr: null,
|
|
42
|
+
// aprType: 'variable',
|
|
43
|
+
// },
|
|
44
|
+
// 'Variable APR:',
|
|
45
|
+
// 'See Terms',
|
|
46
|
+
// ],
|
|
47
|
+
// ])('returns %s when purchaseApr is %s', (offer, expected, content) => {
|
|
48
|
+
// const result = purchaseApr({
|
|
49
|
+
// ...offer,
|
|
50
|
+
// purchaseApr: offer.purchaseApr ?? undefined,
|
|
51
|
+
// minPurchaseApr: offer.minPurchaseApr ?? undefined,
|
|
52
|
+
// maxPurchaseApr: offer.maxPurchaseApr ?? undefined,
|
|
53
|
+
// } as unknown as BaseOffer)({
|
|
54
|
+
// format: 'purchaseApr',
|
|
55
|
+
// label: 'Purchase APR',
|
|
56
|
+
// purchaseAprTextField: 'purchaseApr',
|
|
57
|
+
// minPurchaseAprField: 'minPurchaseApr',
|
|
58
|
+
// maxPurchaseAprField: 'maxPurchaseApr',
|
|
59
|
+
// aprTypeField: 'aprType',
|
|
60
|
+
// })
|
|
61
|
+
|
|
62
|
+
// expect(result).toEqual({
|
|
63
|
+
// label: expected,
|
|
64
|
+
// content: content,
|
|
65
|
+
// })
|
|
66
|
+
// })
|
|
67
|
+
// })
|
|
68
|
+
//# sourceMappingURL=purchaseApr.spec.js.map
|
package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.ts"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|