@moneylion/react-native-offer-carousel 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -0
- package/lib/commonjs/capabilities/configuration/src/brands/checkVisualEligibility.js +30 -0
- package/lib/commonjs/capabilities/configuration/src/brands/checkVisualEligibility.js.map +1 -0
- package/lib/commonjs/capabilities/configuration/src/brands/createDerivedBrands.js +40 -0
- package/lib/commonjs/capabilities/configuration/src/brands/createDerivedBrands.js.map +1 -0
- package/lib/commonjs/capabilities/configuration/src/brands/index.js +20 -0
- package/lib/commonjs/capabilities/configuration/src/brands/index.js.map +1 -0
- package/lib/commonjs/capabilities/configuration/src/brands/types.js +13 -0
- package/lib/commonjs/capabilities/configuration/src/brands/types.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js +17 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +33 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/index.js +17 -0
- package/lib/commonjs/capabilities/core/src/index.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/CnfContext.js +18 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/CnfContext.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/App.js +18 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/App.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js +87 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Configuration.js +41 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Configuration.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Request.js +21 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Request.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Session.js +12 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Session.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Signals.js +41 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Signals.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Subaccount.js +26 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Subaccount.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/index.js +83 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js +131 -0
- package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/index.js +65 -0
- package/lib/commonjs/capabilities/offer-catalog/src/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/types/offerCatalogSchema.js +2 -0
- package/lib/commonjs/capabilities/offer-catalog/src/types/offerCatalogSchema.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js +11 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/contextUtil.js +70 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/contextUtil.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/errorUtil.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/errorUtil.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/formatUtils.js +161 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/formatUtils.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/getOfferUrl.js +44 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/getOfferUrl.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js +78 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js +22 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js +60 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.js +20 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js +62 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js +32 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js +31 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currency.js +22 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currency.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js +46 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js +208 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js +20 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js +24 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js +40 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/index.js +204 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js +35 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js +43 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js +32 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js +76 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js +69 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js +23 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js +47 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js +72 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js +23 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js +29 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js +53 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js +46 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js +26 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js +83 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js +28 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js +28 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js +30 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/index.js +48 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/types.js +6 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/types.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js +6 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js +2 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js +2 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/index.js +6 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/index.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js +74 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js +61 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js +143 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/index.js +54 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js +122 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/index.js +13 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/index.js +110 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js +91 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js +44 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/index.js +28 -0
- package/lib/commonjs/capabilities/ui/elements/src/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/offerCardAttributes.js +23 -0
- package/lib/commonjs/capabilities/ui/elements/src/offerCardAttributes.js.map +1 -0
- package/lib/commonjs/components/Cards/VideosCard/VideosCard.js +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/index.js +4 -4
- package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
- package/lib/commonjs/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
- package/lib/commonjs/components/Modal/DescriptionPoints.js +3 -3
- package/lib/commonjs/components/Modal/DescriptionPoints.js.map +1 -1
- package/lib/commonjs/components/Modal/Disclaimer.js +1 -1
- package/lib/commonjs/components/Modal/Disclaimer.js.map +1 -1
- package/lib/commonjs/components/MoneyLionOfferCarousel.js +1 -1
- package/lib/commonjs/config/mocks/cnfContext.js +143 -0
- package/lib/commonjs/config/mocks/cnfContext.js.map +1 -0
- package/lib/commonjs/pageData.js +1 -1
- package/lib/commonjs/services/getProductTypesByQuery.js +1 -1
- package/lib/commonjs/utils/formatOfferUrl.js +1 -1
- package/lib/commonjs/utils/getOffersByProductTypes.js +2 -2
- package/lib/module/capabilities/configuration/src/brands/checkVisualEligibility.js +24 -0
- package/lib/module/capabilities/configuration/src/brands/checkVisualEligibility.js.map +1 -0
- package/lib/module/capabilities/configuration/src/brands/createDerivedBrands.js +34 -0
- package/lib/module/capabilities/configuration/src/brands/createDerivedBrands.js.map +1 -0
- package/lib/module/capabilities/configuration/src/brands/index.js +3 -0
- package/lib/module/capabilities/configuration/src/brands/index.js.map +1 -0
- package/lib/module/capabilities/configuration/src/brands/types.js +6 -0
- package/lib/module/capabilities/configuration/src/brands/types.js.map +1 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/index.js +2 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/index.js.map +1 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +26 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +1 -0
- package/lib/module/capabilities/core/src/index.js +2 -0
- package/lib/module/capabilities/core/src/index.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/CnfContext.js +12 -0
- package/lib/module/capabilities/core/src/system/cnfContext/CnfContext.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/App.js +12 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/App.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js +81 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Configuration.js +35 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Configuration.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Request.js +15 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Request.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Session.js +6 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Session.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Signals.js +35 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Signals.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Subaccount.js +20 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Subaccount.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/index.js +8 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js +122 -0
- package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/index.js +5 -0
- package/lib/module/capabilities/offer-catalog/src/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/types/offerCatalogSchema.js +2 -0
- package/lib/module/capabilities/offer-catalog/src/types/offerCatalogSchema.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js +4 -0
- package/lib/module/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/contextUtil.js +58 -0
- package/lib/module/capabilities/offer-catalog/src/utils/contextUtil.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/errorUtil.js +15 -0
- package/lib/module/capabilities/offer-catalog/src/utils/errorUtil.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/formatUtils.js +151 -0
- package/lib/module/capabilities/offer-catalog/src/utils/formatUtils.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/getOfferUrl.js +37 -0
- package/lib/module/capabilities/offer-catalog/src/utils/getOfferUrl.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js +71 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js +15 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js +59 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.js +13 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js +61 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js +25 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js +30 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currency.js +15 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currency.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js +39 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js +207 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js +13 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js +23 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js +14 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js +39 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/index.js +20 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js +28 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js +42 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js +14 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js +31 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js +69 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js +68 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js +16 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js +40 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js +71 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js +16 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js +28 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js +46 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js +45 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js +19 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js +82 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js +21 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js +27 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js +14 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js +29 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/index.js +41 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/types.js +2 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/types.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/index.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/index.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js +65 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js +50 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js +134 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/index.js +46 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js +115 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/index.js +2 -0
- package/lib/module/capabilities/ui/elements/src/components/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/index.js +103 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js +86 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js +43 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/index.js +3 -0
- package/lib/module/capabilities/ui/elements/src/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/offerCardAttributes.js +16 -0
- package/lib/module/capabilities/ui/elements/src/offerCardAttributes.js.map +1 -0
- package/lib/module/components/Cards/VideosCard/VideosCard.js +1 -1
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js +1 -2
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
- package/lib/module/components/Common/BaseOfferCard/index.js +3 -4
- package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js.map +1 -1
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js.map +1 -1
- package/lib/module/components/Modal/DescriptionPoints.js +2 -2
- package/lib/module/components/Modal/DescriptionPoints.js.map +1 -1
- package/lib/module/components/Modal/Disclaimer.js +1 -1
- package/lib/module/components/Modal/Disclaimer.js.map +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/module/config/mocks/cnfContext.js +137 -0
- package/lib/module/config/mocks/cnfContext.js.map +1 -0
- package/lib/module/pageData.js +1 -1
- package/lib/module/pageData.js.map +1 -1
- package/lib/module/services/getProductTypesByQuery.js +1 -1
- package/lib/module/services/getProductTypesByQuery.js.map +1 -1
- package/lib/module/utils/formatOfferUrl.js +1 -1
- package/lib/module/utils/formatOfferUrl.js.map +1 -1
- package/lib/module/utils/getOffersByProductTypes.js +2 -2
- package/lib/module/utils/getOffersByProductTypes.js.map +1 -1
- package/lib/typescript/builder/builder.d.ts +2 -2
- package/lib/typescript/builder/builder.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/createDerivedBrands.d.ts +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/configuration/src/brands/index.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/types.d.ts +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/types.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/CnfContext.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/App.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Request.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Session.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/errorUtil.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/types.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts +9 -9
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/components.d.ts +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/index.d.ts +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/offerCardAttributes.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts +5 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts +2 -2
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts +2 -2
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts +3 -3
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts +1 -1
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -1
- package/lib/typescript/src/config/mocks/cnfContext.d.ts.map +1 -0
- package/lib/typescript/src/context/EventHandlerProvider.d.ts +1 -1
- package/lib/typescript/src/context/EventHandlerProvider.d.ts.map +1 -1
- package/lib/typescript/src/pageData.d.ts +2 -2
- package/lib/typescript/src/pageData.d.ts.map +1 -1
- package/lib/typescript/src/services/getDynamicOffers.d.ts +3 -3
- package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts +1 -1
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts.map +1 -1
- package/lib/typescript/src/utils/formatOfferUrl.d.ts +1 -1
- package/lib/typescript/src/utils/formatOfferUrl.d.ts.map +1 -1
- package/lib/typescript/src/utils/getDefaultProductType.d.ts +1 -1
- package/lib/typescript/src/utils/getDefaultProductType.d.ts.map +1 -1
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts +1 -1
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts +1 -1
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts.map +1 -1
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts +2 -2
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts +1 -1
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts.map +1 -1
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts +1 -1
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts +1 -1
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/capabilities/configuration/src/brands/checkVisualEligibility.ts +29 -0
- package/src/capabilities/configuration/src/brands/createDerivedBrands.ts +39 -0
- package/src/capabilities/configuration/src/brands/index.ts +2 -0
- package/src/capabilities/configuration/src/brands/types.ts +8 -0
- package/src/capabilities/core/src/domain/third-party-search/index.ts +1 -0
- package/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.ts +33 -0
- package/src/capabilities/core/src/index.ts +1 -0
- package/src/capabilities/core/src/system/cnfContext/CnfContext.ts +21 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/App.ts +13 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Brand.ts +119 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Configuration.ts +49 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Request.ts +16 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Session.ts +9 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Signals.ts +47 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Subaccount.ts +25 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/index.ts +7 -0
- package/src/capabilities/offer-catalog/src/api/offerCatalogApi.ts +171 -0
- package/src/capabilities/offer-catalog/src/index.ts +10 -0
- package/src/capabilities/offer-catalog/src/types/offerCatalogSchema.ts +119 -0
- package/src/capabilities/offer-catalog/src/utils/arrayToMarkdownList.ts +3 -0
- package/src/capabilities/offer-catalog/src/utils/contextUtil.ts +73 -0
- package/src/capabilities/offer-catalog/src/utils/errorUtil.ts +18 -0
- package/src/capabilities/offer-catalog/src/utils/formatUtils.ts +168 -0
- package/src/capabilities/offer-catalog/src/utils/getOfferUrl.ts +61 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.ts +103 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.ts +58 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.ts +31 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.ts +60 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/common.ts +31 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.ts +29 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.ts +36 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/currency.ts +24 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.ts +206 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.ts +83 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.ts +22 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.ts +25 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.ts +38 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.ts +24 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/index.ts +19 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.ts +41 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.ts +52 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.ts +30 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.ts +23 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.ts +67 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.ts +92 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.ts +34 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.ts +70 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.ts +71 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.ts +27 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.ts +38 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.ts +44 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.ts +68 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.ts +81 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.ts +38 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.ts +26 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.ts +45 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.ts +28 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.ts +23 -0
- package/src/capabilities/offer-catalog/src/utils/stats/index.ts +141 -0
- package/src/capabilities/offer-catalog/src/utils/stats/types.ts +47 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.ts +6 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.ts +2272 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.ts +1924 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/types/index.ts +5 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.ts +83 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.tsx +66 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/components.tsx +175 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/index.tsx +52 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.ts +124 -0
- package/src/capabilities/ui/elements/src/components/index.ts +1 -0
- package/src/capabilities/ui/elements/src/components/thumbor/index.tsx +115 -0
- package/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.ts +42 -0
- package/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.ts +110 -0
- package/src/capabilities/ui/elements/src/index.ts +3 -0
- package/src/capabilities/ui/elements/src/offerCardAttributes.ts +28 -0
- package/src/components/Cards/VideosCard/VideosCard.tsx +1 -1
- package/src/components/Common/BaseOfferCard/Stat/Stat.tsx +7 -2
- package/src/components/Common/BaseOfferCard/index.tsx +3 -4
- package/src/components/Common/DynamicOfferCard/CallToAction.tsx +1 -1
- package/src/components/Common/DynamicOfferCard/SeeMore.tsx +1 -1
- package/src/components/Common/DynamicOfferCard/index.tsx +1 -1
- package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +1 -1
- package/src/components/DynamicOffers/Render/FallbackOfferTemplate.tsx +1 -1
- package/src/components/DynamicOffers/Render/Offer.tsx +1 -1
- package/src/components/Layouts/CreditCardOfferCard/index.tsx +1 -1
- package/src/components/Layouts/CreditCardOfferCard/statsBuilder.tsx +2 -2
- package/src/components/Layouts/DefaultOfferCard/index.tsx +1 -1
- package/src/components/Layouts/DefaultOfferCard/statsBuilder.tsx +2 -2
- package/src/components/Layouts/HeadlineWithDescriptionCard/index.tsx +1 -1
- package/src/components/Modal/DescriptionPoints.tsx +2 -2
- package/src/components/Modal/Disclaimer.tsx +1 -1
- package/src/components/Modal/OfferDetailsModal.tsx +1 -1
- package/src/components/MoneyLionOfferCarousel.tsx +2 -2
- package/src/config/mocks/cnfContext.ts +136 -0
- package/src/context/EventHandlerProvider.tsx +1 -1
- package/src/pageData.ts +2 -2
- package/src/services/getDynamicOffers.ts +2 -2
- package/src/services/getProductTypesByQuery.ts +1 -1
- package/src/utils/addClientTagsToOfferLinks.ts +1 -1
- package/src/utils/formatOfferUrl.ts +1 -1
- package/src/utils/getDefaultProductType.ts +1 -1
- package/src/utils/getEnableUseCachedOffers.ts +1 -1
- package/src/utils/getOffersBasedOnLayout.ts +1 -1
- package/src/utils/getOffersByProductTypes.ts +3 -3
- package/src/utils/getProductTypesDefinition.ts +1 -1
- package/src/utils/selectDynamicOffers.ts +1 -1
- package/src/utils/sortOffersByRecommendationScore.ts +1 -1
- package/lib/typescript/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +0 -1
- package/lib/typescript/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +0 -1
- package/lib/typescript/capabilities/configuration/src/brands/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/configuration/src/brands/types.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/domain/third-party-search/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/CnfContext.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/App.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Request.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Session.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/errorUtil.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/types.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts +0 -7
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts +0 -12
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts +0 -2
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/offerCardAttributes.d.ts.map +0 -1
- package/lib/typescript/config/mocks/cnfContext.d.ts.map +0 -1
- /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/checkVisualEligibility.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/domain/third-party-search/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/CnfContext.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/App.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Brand.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Configuration.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Request.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Session.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Signals.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Subaccount.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/api/offerCatalogApi.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/types/offerCatalogSchema.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/arrayToMarkdownList.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/contextUtil.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/errorUtil.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/formatUtils.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/getOfferUrl.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/annualFee.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/boolean.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/common.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/common.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currency.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/percentage.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/types.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/types/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/Abbreviation.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/offerCardAttributes.d.ts +0 -0
- /package/lib/typescript/{config → src/config}/mocks/cnfContext.d.ts +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import defu from "defu";
|
|
2
|
+
import { get, mapValues } from "radash";
|
|
3
|
+
import { createDerivedBrands } from "../../../../../configuration/src/brands/createDerivedBrands";
|
|
4
|
+
import type { CnfContext } from "../../../../../core/src/system/cnfContext/CnfContext";
|
|
5
|
+
|
|
6
|
+
import type { LeadCreateData } from "./types";
|
|
7
|
+
import type { LeadRequestOfferCatalog } from "./offer-catalog/types";
|
|
8
|
+
import type { Brand } from "../../../../../../../builder";
|
|
9
|
+
|
|
10
|
+
const UUID_V4_REGEX =
|
|
11
|
+
/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Checks if a value is a string that matches the UUIDv4 format
|
|
15
|
+
*
|
|
16
|
+
* @param x some unknown value
|
|
17
|
+
* @returns true iff x is a string that matches the UUIDv4 format
|
|
18
|
+
*/
|
|
19
|
+
export const isUUIDv4 = (x: unknown) =>
|
|
20
|
+
typeof x === "string" && UUID_V4_REGEX.test(x);
|
|
21
|
+
|
|
22
|
+
const removePrefixFromAppName = (appName: string) => {
|
|
23
|
+
if (appName.startsWith("@")) {
|
|
24
|
+
return appName.substring(1);
|
|
25
|
+
}
|
|
26
|
+
return appName;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const getBrand = (context: CnfContext): Brand => {
|
|
30
|
+
try {
|
|
31
|
+
return context.brand as Brand;
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.log(e);
|
|
34
|
+
}
|
|
35
|
+
throw new Error("Brand not found");
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export function withDeviceSignals<
|
|
39
|
+
TData extends LeadCreateData | LeadRequestOfferCatalog,
|
|
40
|
+
>(context: CnfContext, payload: TData) {
|
|
41
|
+
const maybeDeviceId = get(context, "signals.deviceSignals.id", undefined);
|
|
42
|
+
const ipAddress = get(context, "signals.deviceSignals.ipAddress", undefined);
|
|
43
|
+
const os = get(context, "signals.deviceSignals.os", "");
|
|
44
|
+
const isMobile = get(context, "signals.deviceSignals.isMobile", false);
|
|
45
|
+
const evReferrer = get(context, "request.referer", "");
|
|
46
|
+
const cnfEnvironment = get(process, "env.ENVIRONMENT", "local");
|
|
47
|
+
const [licensedBrand] = createDerivedBrands(getBrand(context));
|
|
48
|
+
const consumerBrand = get(licensedBrand, "domain", undefined);
|
|
49
|
+
const userAgent = get(context, "signals.deviceSignals.userAgent", undefined);
|
|
50
|
+
|
|
51
|
+
const system = "cnf-apps";
|
|
52
|
+
const app = removePrefixFromAppName(
|
|
53
|
+
get(context, "configuration.app.name", "unknown")
|
|
54
|
+
);
|
|
55
|
+
const clientTags = {
|
|
56
|
+
...get(context, "signals.partnerSignals.clientTags", {}),
|
|
57
|
+
os,
|
|
58
|
+
isMobile,
|
|
59
|
+
evReferrer,
|
|
60
|
+
consumerBrand,
|
|
61
|
+
app,
|
|
62
|
+
system,
|
|
63
|
+
cnfEnvironment,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
return defu(payload, {
|
|
67
|
+
/**
|
|
68
|
+
* The leads API required device ID's be in the UUID format. If the string
|
|
69
|
+
* we receive here is not in the expected format, we will create an error
|
|
70
|
+
* passing it to the API.
|
|
71
|
+
*/
|
|
72
|
+
deviceId: isUUIDv4(maybeDeviceId) ? maybeDeviceId : undefined,
|
|
73
|
+
sessionInformation: {
|
|
74
|
+
ipAddress,
|
|
75
|
+
userAgent,
|
|
76
|
+
},
|
|
77
|
+
clientTags: mapValues(
|
|
78
|
+
clientTags,
|
|
79
|
+
// all values must be arrays of strings
|
|
80
|
+
(value) => (Array.isArray(value) ? value.map(String) : [String(value)])
|
|
81
|
+
),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Abbreviation.tsx
|
|
2
|
+
import React, { useState, type PropsWithChildren } from "react";
|
|
3
|
+
import {
|
|
4
|
+
StyleSheet,
|
|
5
|
+
TouchableWithoutFeedback,
|
|
6
|
+
Modal,
|
|
7
|
+
View,
|
|
8
|
+
} from "react-native";
|
|
9
|
+
import Text from "../../../../../../components/Text";
|
|
10
|
+
|
|
11
|
+
export const Abbreviation = ({
|
|
12
|
+
children,
|
|
13
|
+
title,
|
|
14
|
+
}: PropsWithChildren<{ title?: string }>) => {
|
|
15
|
+
const [visible, setVisible] = useState(false);
|
|
16
|
+
|
|
17
|
+
// Since React Native doesn't have hover, we'll use a modal or tooltip
|
|
18
|
+
// This is a simplified version - you might want to use a more sophisticated
|
|
19
|
+
// tooltip library for a better UI experience
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<>
|
|
23
|
+
<TouchableWithoutFeedback onPress={() => setVisible(true)}>
|
|
24
|
+
<>
|
|
25
|
+
{/* <Link color="inherit" variant="plain" style={styles.abbreviation}> */}
|
|
26
|
+
{children}
|
|
27
|
+
{/* </Link> */}
|
|
28
|
+
</>
|
|
29
|
+
</TouchableWithoutFeedback>
|
|
30
|
+
|
|
31
|
+
<Modal
|
|
32
|
+
transparent
|
|
33
|
+
visible={visible}
|
|
34
|
+
animationType="fade"
|
|
35
|
+
onRequestClose={() => setVisible(false)}
|
|
36
|
+
>
|
|
37
|
+
<TouchableWithoutFeedback onPress={() => setVisible(false)}>
|
|
38
|
+
<View style={styles.modalOverlay}>
|
|
39
|
+
<View style={styles.tooltipContainer}>
|
|
40
|
+
<Text variant="body-3">{title}</Text>
|
|
41
|
+
</View>
|
|
42
|
+
</View>
|
|
43
|
+
</TouchableWithoutFeedback>
|
|
44
|
+
</Modal>
|
|
45
|
+
</>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const styles = StyleSheet.create({
|
|
50
|
+
abbreviation: {
|
|
51
|
+
textDecorationLine: "underline",
|
|
52
|
+
textDecorationStyle: "dashed",
|
|
53
|
+
},
|
|
54
|
+
modalOverlay: {
|
|
55
|
+
flex: 1,
|
|
56
|
+
justifyContent: "center",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
59
|
+
},
|
|
60
|
+
tooltipContainer: {
|
|
61
|
+
backgroundColor: "white",
|
|
62
|
+
padding: 16,
|
|
63
|
+
borderRadius: 8,
|
|
64
|
+
maxWidth: "80%",
|
|
65
|
+
},
|
|
66
|
+
});
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// components.tsx
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { StyleSheet } from "react-native";
|
|
4
|
+
// import { Text, Link } from "reshaped/native"; // Assuming you have Reshaped for React Native
|
|
5
|
+
import { Abbreviation } from "./Abbreviation";
|
|
6
|
+
import {
|
|
7
|
+
openUrl,
|
|
8
|
+
type ASTNode,
|
|
9
|
+
type RenderRules,
|
|
10
|
+
} from "react-native-markdown-display";
|
|
11
|
+
import Text, {
|
|
12
|
+
type TextColor,
|
|
13
|
+
type TextWeight,
|
|
14
|
+
type Variant,
|
|
15
|
+
} from "../../../../../../components/Text";
|
|
16
|
+
|
|
17
|
+
// Helper to create text variants
|
|
18
|
+
const createTextVariant =
|
|
19
|
+
(props: any) => (_node: ASTNode, children: React.ReactNode) => {
|
|
20
|
+
return <Text {...props}>{children}</Text>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const createMarkdownComponents = ({
|
|
24
|
+
numberOfLines,
|
|
25
|
+
variant,
|
|
26
|
+
weight,
|
|
27
|
+
color,
|
|
28
|
+
}: {
|
|
29
|
+
numberOfLines?: number;
|
|
30
|
+
variant?: Variant;
|
|
31
|
+
weight?: TextWeight;
|
|
32
|
+
color?: TextColor;
|
|
33
|
+
}): RenderRules => {
|
|
34
|
+
// Keep track of the first list item
|
|
35
|
+
let isFirstListItem = true;
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
// Headings
|
|
39
|
+
heading1: createTextVariant({ variant: "title-1" }),
|
|
40
|
+
heading2: createTextVariant({ variant: "title-2" }),
|
|
41
|
+
heading3: createTextVariant({ variant: "title-3" }),
|
|
42
|
+
heading4: createTextVariant({ variant: "title-4" }),
|
|
43
|
+
heading5: createTextVariant({ variant: "title-5" }),
|
|
44
|
+
|
|
45
|
+
// Lists
|
|
46
|
+
bullet_list: (node: ASTNode, children: React.ReactNode) => {
|
|
47
|
+
// Reset the flag when a new list starts
|
|
48
|
+
isFirstListItem = true;
|
|
49
|
+
return (
|
|
50
|
+
<Text
|
|
51
|
+
key={node.key || `${node.type}-${node.index}`}
|
|
52
|
+
variant={variant}
|
|
53
|
+
weight={weight}
|
|
54
|
+
color={color}
|
|
55
|
+
numberOfLines={numberOfLines}
|
|
56
|
+
style={styles.bulletList}
|
|
57
|
+
>
|
|
58
|
+
{children}
|
|
59
|
+
</Text>
|
|
60
|
+
);
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
// Links - Add detection for abbreviations in the text content
|
|
64
|
+
link: (node: ASTNode, children: React.ReactNode) => {
|
|
65
|
+
// Check if this link has a title attribute - if so, treat it as an abbreviation
|
|
66
|
+
if (node.attributes && node.attributes.title) {
|
|
67
|
+
return (
|
|
68
|
+
<Abbreviation
|
|
69
|
+
key={node.key || `${node.type}-${node.index}`}
|
|
70
|
+
title={node.attributes.title}
|
|
71
|
+
>
|
|
72
|
+
{children}
|
|
73
|
+
</Abbreviation>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<Text
|
|
79
|
+
key={node.key || `${node.type}-${node.index}`}
|
|
80
|
+
variant={variant}
|
|
81
|
+
weight={weight}
|
|
82
|
+
color={"primary"}
|
|
83
|
+
style={styles.linkText}
|
|
84
|
+
onPress={() => openUrl(node.attributes.href || "")}
|
|
85
|
+
>
|
|
86
|
+
{children}
|
|
87
|
+
</Text>
|
|
88
|
+
);
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
// Custom parser for text to find potential abbreviation patterns
|
|
92
|
+
text: (node: ASTNode) => {
|
|
93
|
+
// If this implementation doesn't catch abbreviations, we'll need to
|
|
94
|
+
// pre-process the markdown before passing it to the renderer
|
|
95
|
+
return (
|
|
96
|
+
<Text
|
|
97
|
+
key={node.key || `${node.type}-${node.index}`}
|
|
98
|
+
variant={variant}
|
|
99
|
+
weight={weight}
|
|
100
|
+
color={color}
|
|
101
|
+
>
|
|
102
|
+
{node.content}
|
|
103
|
+
</Text>
|
|
104
|
+
);
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
// List items
|
|
108
|
+
list_item: (node: ASTNode, children: React.ReactNode) => {
|
|
109
|
+
// Only add \n if this is not the first item
|
|
110
|
+
const prefix = isFirstListItem ? "" : "\n";
|
|
111
|
+
// Set flag to false after the first item
|
|
112
|
+
isFirstListItem = false;
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<Text
|
|
116
|
+
key={node.key || `${node.type}-${node.index}`}
|
|
117
|
+
variant={variant || "body-3"}
|
|
118
|
+
weight={weight}
|
|
119
|
+
color={color || "neutral-faded"}
|
|
120
|
+
>
|
|
121
|
+
<Text variant={"body-1"}>{prefix}• </Text>
|
|
122
|
+
{children}
|
|
123
|
+
</Text>
|
|
124
|
+
);
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
// Paragraphs
|
|
128
|
+
paragraph: (node: ASTNode, children: React.ReactNode) => {
|
|
129
|
+
return (
|
|
130
|
+
<Text
|
|
131
|
+
key={node.key || `${node.type}-${node.index}`}
|
|
132
|
+
variant={variant}
|
|
133
|
+
weight={weight}
|
|
134
|
+
color={color}
|
|
135
|
+
>
|
|
136
|
+
{children}
|
|
137
|
+
</Text>
|
|
138
|
+
);
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
// Strong/Bold text
|
|
142
|
+
strong: (node: ASTNode, children: React.ReactNode) => (
|
|
143
|
+
<Text
|
|
144
|
+
key={node.key || `${node.type}-${node.index}`}
|
|
145
|
+
variant={variant}
|
|
146
|
+
weight={"bold"}
|
|
147
|
+
color={color}
|
|
148
|
+
>
|
|
149
|
+
{children}
|
|
150
|
+
</Text>
|
|
151
|
+
),
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const styles = StyleSheet.create({
|
|
156
|
+
bulletList: {
|
|
157
|
+
marginVertical: 8,
|
|
158
|
+
flexDirection: "column",
|
|
159
|
+
alignItems: "flex-start",
|
|
160
|
+
},
|
|
161
|
+
bulletPoint: {
|
|
162
|
+
width: 6,
|
|
163
|
+
height: 6,
|
|
164
|
+
borderRadius: 3,
|
|
165
|
+
backgroundColor: "black",
|
|
166
|
+
marginTop: 8,
|
|
167
|
+
marginRight: 8,
|
|
168
|
+
},
|
|
169
|
+
listItemText: {
|
|
170
|
+
marginBottom: 4,
|
|
171
|
+
},
|
|
172
|
+
linkText: {
|
|
173
|
+
textDecorationLine: "underline",
|
|
174
|
+
},
|
|
175
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createMarkdownComponents } from "./components";
|
|
3
|
+
import { preprocessMarkdown } from "./markdownPreprocessor";
|
|
4
|
+
import Markdown from "react-native-markdown-display";
|
|
5
|
+
import type { TextProps } from "../../../../../../components/Text";
|
|
6
|
+
|
|
7
|
+
export interface Props extends TextProps {
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const MarkdownText = ({
|
|
12
|
+
content,
|
|
13
|
+
numberOfLines,
|
|
14
|
+
color,
|
|
15
|
+
weight,
|
|
16
|
+
variant,
|
|
17
|
+
}: Props) => {
|
|
18
|
+
// Create style object for text properties
|
|
19
|
+
const textStyle = {
|
|
20
|
+
color: color,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// Prepare styles for markdown
|
|
24
|
+
const markdownStyles = {
|
|
25
|
+
body: {
|
|
26
|
+
...textStyle,
|
|
27
|
+
flexShrink: 1,
|
|
28
|
+
},
|
|
29
|
+
paragraph: {
|
|
30
|
+
flexShrink: 1,
|
|
31
|
+
},
|
|
32
|
+
// Include styles for all markdown elements that need to respect text properties
|
|
33
|
+
text: {
|
|
34
|
+
...textStyle,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Use the factory function to create components with numberOfLines support
|
|
39
|
+
const customRules = createMarkdownComponents({
|
|
40
|
+
numberOfLines,
|
|
41
|
+
variant,
|
|
42
|
+
weight,
|
|
43
|
+
color,
|
|
44
|
+
});
|
|
45
|
+
// Preprocess the markdown to handle abbreviations
|
|
46
|
+
const processedContent = preprocessMarkdown(content);
|
|
47
|
+
return (
|
|
48
|
+
<Markdown rules={customRules} style={markdownStyles}>
|
|
49
|
+
{processedContent}
|
|
50
|
+
</Markdown>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
const convertHtmlLinksToMarkdown = (inputString: string): string => {
|
|
2
|
+
// Regular expression to match HTML anchor tags
|
|
3
|
+
// This pattern captures the href attribute and the link text
|
|
4
|
+
const anchorTagRegex =
|
|
5
|
+
/<a\s+(?:[^>]*?\s+)?href="([^"]*)"(?:[^>]*?)>(.*?)<\/a>/g;
|
|
6
|
+
|
|
7
|
+
// Replace all anchor tags with markdown link format
|
|
8
|
+
const resultString = inputString.replace(
|
|
9
|
+
anchorTagRegex,
|
|
10
|
+
(_match, url, text) => {
|
|
11
|
+
return `[${text}](${url})`;
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
return resultString;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const preprocessMarkdown = (markdown: string): string => {
|
|
19
|
+
// Convert <sup> tags to Unicode superscript equivalents
|
|
20
|
+
const supRegex = /<sup>([^<]+)<\/sup>/g;
|
|
21
|
+
let processed = markdown.replace(supRegex, (_match, text: string) => {
|
|
22
|
+
const superscriptMap: { [key: string]: string } = {
|
|
23
|
+
"1": "¹",
|
|
24
|
+
"2": "²",
|
|
25
|
+
"3": "³",
|
|
26
|
+
"4": "⁴",
|
|
27
|
+
"5": "⁵",
|
|
28
|
+
"6": "⁶",
|
|
29
|
+
"7": "⁷",
|
|
30
|
+
"8": "⁸",
|
|
31
|
+
"9": "⁹",
|
|
32
|
+
"0": "⁰",
|
|
33
|
+
"a": "ᵃ",
|
|
34
|
+
"b": "ᵇ",
|
|
35
|
+
"c": "ᶜ",
|
|
36
|
+
"d": "ᵈ",
|
|
37
|
+
"e": "ᵉ",
|
|
38
|
+
"f": "ᶠ",
|
|
39
|
+
"g": "ᵍ",
|
|
40
|
+
"h": "ʰ",
|
|
41
|
+
"i": "ⁱ",
|
|
42
|
+
"j": "ʲ",
|
|
43
|
+
"k": "ᵏ",
|
|
44
|
+
"l": "ˡ",
|
|
45
|
+
"m": "ᵐ",
|
|
46
|
+
"n": "ⁿ",
|
|
47
|
+
"o": "ᵒ",
|
|
48
|
+
"p": "ᵖ",
|
|
49
|
+
"q": "ᵠ",
|
|
50
|
+
"r": "ʳ",
|
|
51
|
+
"s": "ˢ",
|
|
52
|
+
"t": "ᵗ",
|
|
53
|
+
"u": "ᵘ",
|
|
54
|
+
"v": "ᵛ",
|
|
55
|
+
"w": "ʷ",
|
|
56
|
+
"x": "ˣ",
|
|
57
|
+
"y": "ʸ",
|
|
58
|
+
"z": "ᶻ",
|
|
59
|
+
"A": "ᴬ",
|
|
60
|
+
"B": "ᴮ",
|
|
61
|
+
"C": "ᶜ",
|
|
62
|
+
"D": "ᴰ",
|
|
63
|
+
"E": "ᴱ",
|
|
64
|
+
"F": "ᶠ",
|
|
65
|
+
"G": "ᴳ",
|
|
66
|
+
"H": "ᴴ",
|
|
67
|
+
"I": "ᴵ",
|
|
68
|
+
"J": "ᴶ",
|
|
69
|
+
"K": "ᴷ",
|
|
70
|
+
"L": "ᴸ",
|
|
71
|
+
"M": "ᴹ",
|
|
72
|
+
"N": "ᴺ",
|
|
73
|
+
"O": "ᴼ",
|
|
74
|
+
"P": "ᴾ",
|
|
75
|
+
"Q": "ᵠ",
|
|
76
|
+
"R": "ᴿ",
|
|
77
|
+
"S": "ˢ",
|
|
78
|
+
"T": "ᵀ",
|
|
79
|
+
"U": "ᵁ",
|
|
80
|
+
"V": "ⱽ",
|
|
81
|
+
"W": "ᵂ",
|
|
82
|
+
"X": "ˣ",
|
|
83
|
+
"Y": "ʸ",
|
|
84
|
+
"Z": "ᶻ",
|
|
85
|
+
"(": "⁽",
|
|
86
|
+
")": "⁾",
|
|
87
|
+
"+": "⁺",
|
|
88
|
+
"-": "⁻",
|
|
89
|
+
"=": "⁼",
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
return text
|
|
93
|
+
.split("")
|
|
94
|
+
.map((char: string) => superscriptMap[char] || char) // Use the map or fallback to the original character
|
|
95
|
+
.join("");
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// Convert <b> tags to bold markdown
|
|
99
|
+
const boldRegex = /<b>([^<]+)<\/b>/g;
|
|
100
|
+
processed = processed.replace(boldRegex, (_match, text) => {
|
|
101
|
+
return `**${text}**`;
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// Convert <p> tags to paragraphs
|
|
105
|
+
const pRegex = /<p>(.*?)<\/p>/gs;
|
|
106
|
+
processed = processed.replace(pRegex, (_match, text) => {
|
|
107
|
+
return `${text}\n\n`;
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
// Existing <abbr> tag conversion
|
|
111
|
+
const abbrRegex = /<abbr\s+title="([^"]+)">([^<]+)<\/abbr>/g;
|
|
112
|
+
processed = processed.replace(abbrRegex, (_match, title, text) => {
|
|
113
|
+
return `[${text}](abbr:${text} "${title}")`;
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// Remove extra whitespace
|
|
117
|
+
const whitespaceRegex = /[^\S\r\n]+/g;
|
|
118
|
+
processed = processed.replace(whitespaceRegex, " ").trim();
|
|
119
|
+
|
|
120
|
+
// Convert HTML links to markdown
|
|
121
|
+
processed = convertHtmlLinksToMarkdown(processed);
|
|
122
|
+
|
|
123
|
+
return processed;
|
|
124
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThumborImage } from "./thumbor";
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Image, type ImageProps, StyleSheet } from "react-native";
|
|
3
|
+
import { SvgUri } from "react-native-svg";
|
|
4
|
+
import useSvgUriViewBox from "./useSvgUriViewBox";
|
|
5
|
+
|
|
6
|
+
// Define props interface with required src, width, and height
|
|
7
|
+
interface ThumborImageProps extends Omit<ImageProps, "source"> {
|
|
8
|
+
src: string;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Helper to check if URL is an SVG
|
|
14
|
+
const isSvgUrl = (url: string): boolean => {
|
|
15
|
+
return url.toLowerCase().endsWith(".svg");
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// const removePrefixSlash = (path: string) => {
|
|
19
|
+
// if (path.charAt(0) === "/") return path.substring(1);
|
|
20
|
+
// return path;
|
|
21
|
+
// };
|
|
22
|
+
|
|
23
|
+
// const removeThumborPath = (path: string) => {
|
|
24
|
+
// return path.replace(/^\/?cnf\/thumbor(\/unsafe)?/, "");
|
|
25
|
+
// };
|
|
26
|
+
// const normalizeUrl = chain(removeThumborPath, removePrefixSlash);
|
|
27
|
+
|
|
28
|
+
// const shouldBypassThumbor = (url: URL, cnfBaseUrl: URL) => {
|
|
29
|
+
// if (isSvgUrl(url.pathname)) return true;
|
|
30
|
+
|
|
31
|
+
// // if props.offer.image.match('s3.amazonaws.com')
|
|
32
|
+
// if (
|
|
33
|
+
// url.hostname !== "s3.amazonaws.com" &&
|
|
34
|
+
// url.hostname !== cnfBaseUrl.hostname
|
|
35
|
+
// )
|
|
36
|
+
// return true;
|
|
37
|
+
|
|
38
|
+
// return false;
|
|
39
|
+
// };
|
|
40
|
+
|
|
41
|
+
//TODO(rauloaida): make thumbor always return exact dimensions and doing the fit itself
|
|
42
|
+
// const generateThumborLink = (
|
|
43
|
+
// url: string,
|
|
44
|
+
// width?: number,
|
|
45
|
+
// height?: number,
|
|
46
|
+
// meta = false
|
|
47
|
+
// ) => {
|
|
48
|
+
// const { cnfBaseUrl } = { cnfBaseUrl: "https://www.moneylion.dev" }; // getCNFContext().use().context.request;
|
|
49
|
+
// const parsedCnfBaseUrl = new URL(cnfBaseUrl);
|
|
50
|
+
// const parsedUrl = new URL(url, cnfBaseUrl);
|
|
51
|
+
// if (shouldBypassThumbor(parsedUrl, parsedCnfBaseUrl)) {
|
|
52
|
+
// return url;
|
|
53
|
+
// }
|
|
54
|
+
// const imagePath = normalizeUrl(url);
|
|
55
|
+
// const META = meta ? "meta" : undefined;
|
|
56
|
+
// const trim = "trim:top-left:35";
|
|
57
|
+
// const fit = `fit-in/${width ?? ""}x${height ?? ""}`;
|
|
58
|
+
// const filters = "filters:format(webp):background_color(white)";
|
|
59
|
+
|
|
60
|
+
// return sift([
|
|
61
|
+
// cnfBaseUrl,
|
|
62
|
+
// "cnf/thumbor/unsafe",
|
|
63
|
+
// META,
|
|
64
|
+
// trim,
|
|
65
|
+
// fit,
|
|
66
|
+
// filters,
|
|
67
|
+
// imagePath,
|
|
68
|
+
// ]).join("/");
|
|
69
|
+
// };
|
|
70
|
+
|
|
71
|
+
export const ThumborImage = ({
|
|
72
|
+
src,
|
|
73
|
+
width,
|
|
74
|
+
height,
|
|
75
|
+
...props
|
|
76
|
+
}: ThumborImageProps) => {
|
|
77
|
+
// Check if the image is an SVG
|
|
78
|
+
const isSvg = isSvgUrl(src);
|
|
79
|
+
|
|
80
|
+
const { viewBox, computedWidth } = useSvgUriViewBox(
|
|
81
|
+
src,
|
|
82
|
+
isSvg,
|
|
83
|
+
height,
|
|
84
|
+
width
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
if (isSvg) {
|
|
88
|
+
// For SVG images, use SvgUri component
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<SvgUri
|
|
92
|
+
uri={src}
|
|
93
|
+
width={computedWidth ?? width}
|
|
94
|
+
height={height}
|
|
95
|
+
style={[styles.svgStyle, props.style]}
|
|
96
|
+
viewBox={viewBox}
|
|
97
|
+
/>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<Image
|
|
103
|
+
{...props}
|
|
104
|
+
width={computedWidth ?? width}
|
|
105
|
+
height={height}
|
|
106
|
+
source={{ uri: src }}
|
|
107
|
+
/>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const styles = StyleSheet.create({
|
|
112
|
+
svgStyle: {
|
|
113
|
+
alignSelf: "flex-start",
|
|
114
|
+
},
|
|
115
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// import { renderHook, waitFor } from "@testing-library/react-native";
|
|
2
|
+
// import useSvgUriViewBox from "./useSvgUriViewBox";
|
|
3
|
+
|
|
4
|
+
// describe("useSvgUriViewBox()", () => {
|
|
5
|
+
// const MOCK_SVG_WITH_VIEWBOX = `<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60" fill="none"></svg>`;
|
|
6
|
+
// const MOCK_SVG_WITHOUT_VIEWBOX = `<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" fill="none"></svg>`;
|
|
7
|
+
|
|
8
|
+
// function arrangeMocks() {
|
|
9
|
+
// const mockResponseTextFn = jest
|
|
10
|
+
// .fn()
|
|
11
|
+
// .mockResolvedValue(MOCK_SVG_WITHOUT_VIEWBOX);
|
|
12
|
+
// jest
|
|
13
|
+
// .spyOn(global, "fetch")
|
|
14
|
+
// .mockResolvedValue({ text: mockResponseTextFn } as unknown as Response);
|
|
15
|
+
|
|
16
|
+
// return { mockText: mockResponseTextFn };
|
|
17
|
+
// }
|
|
18
|
+
|
|
19
|
+
// it("should return view-box if svg if missing a view-box", async () => {
|
|
20
|
+
// const { mockText } = arrangeMocks();
|
|
21
|
+
// mockText.mockResolvedValueOnce(MOCK_SVG_WITHOUT_VIEWBOX);
|
|
22
|
+
|
|
23
|
+
// const hook = renderHook(() => useSvgUriViewBox("URI", true));
|
|
24
|
+
// await waitFor(() => expect(hook.result.current).toBeDefined());
|
|
25
|
+
// });
|
|
26
|
+
|
|
27
|
+
// it("should return view-box if svg already has view-box", async () => {
|
|
28
|
+
// const { mockText } = arrangeMocks();
|
|
29
|
+
// mockText.mockResolvedValueOnce(MOCK_SVG_WITH_VIEWBOX);
|
|
30
|
+
|
|
31
|
+
// const hook = renderHook(() => useSvgUriViewBox("URI", true));
|
|
32
|
+
// await waitFor(() => expect(hook.result.current).toBeDefined());
|
|
33
|
+
// });
|
|
34
|
+
|
|
35
|
+
// it("should not make async calls if image is not an svg", async () => {
|
|
36
|
+
// const mocks = arrangeMocks();
|
|
37
|
+
// const hook = renderHook(() => useSvgUriViewBox("URI", false));
|
|
38
|
+
|
|
39
|
+
// await waitFor(() => expect(hook.result.current).toBeUndefined());
|
|
40
|
+
// expect(mocks.mockText).not.toHaveBeenCalled();
|
|
41
|
+
// });
|
|
42
|
+
// });
|