@moneylion/react-native-offer-carousel 1.8.0 → 1.8.8
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/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/index.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -1
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js +1 -2
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +1 -2
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js +1 -2
- package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js +1 -2
- package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js +1 -2
- package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/Render/Offer.js +1 -2
- package/lib/commonjs/components/DynamicOffers/Render/Offer.js.map +1 -1
- package/lib/commonjs/components/Modal/AllOffersModal.js +1 -2
- package/lib/commonjs/components/Modal/AllOffersModal.js.map +1 -1
- package/lib/commonjs/components/MoneyLionOfferCarousel.js +24 -4
- package/lib/commonjs/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/commonjs/components/Skeleton/Skeleton.js +1 -2
- package/lib/commonjs/components/Skeleton/Skeleton.js.map +1 -1
- package/lib/commonjs/components/Touchable/index.js +1 -2
- package/lib/commonjs/components/Touchable/index.js.map +1 -1
- package/lib/commonjs/components/utils/errorUtils.js +18 -23
- package/lib/commonjs/components/utils/errorUtils.js.map +1 -1
- package/lib/commonjs/context/ConfigurationProvider.js +1 -2
- package/lib/commonjs/context/ConfigurationProvider.js.map +1 -1
- package/lib/commonjs/context/EventHandlerProvider.js +1 -2
- package/lib/commonjs/context/EventHandlerProvider.js.map +1 -1
- package/lib/commonjs/context/ThemeProvider.js +1 -2
- package/lib/commonjs/context/ThemeProvider.js.map +1 -1
- package/lib/commonjs/version.js +2 -3
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/index.js +18 -19
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/index.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js +24 -3
- package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/module/components/utils/errorUtils.js +18 -23
- package/lib/module/components/utils/errorUtils.js.map +1 -1
- package/lib/module/version.js +2 -2
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/src/apiEnvironment.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/types.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/configuration/src/userData/types.d.ts +6 -0
- package/lib/typescript/src/capabilities/configuration/src/userData/types.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/errors/types/index.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts +2 -2
- package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/getEventCallbackContext.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts +18 -19
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts +11 -11
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts +2 -2
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/components.d.ts +4 -4
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/index.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/offerCardAttributes.d.ts +1 -2
- package/lib/typescript/src/capabilities/ui/elements/src/offerCardAttributes.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts +3 -3
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/StatsContainer/StatsContainer.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts +7 -7
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +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.map +1 -1
- package/lib/typescript/src/components/Divider/index.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/DynamicOffersContainer.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/SeeAllButton.d.ts.map +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.map +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.map +1 -1
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Modal/AllOffersModal.d.ts.map +1 -1
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -1
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts.map +1 -1
- package/lib/typescript/src/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable/TouchableOpacity.d.ts +0 -1
- package/lib/typescript/src/components/Touchable/TouchableOpacity.d.ts.map +1 -1
- package/lib/typescript/src/components/utils/errorUtils.d.ts +3 -3
- package/lib/typescript/src/components/utils/errorUtils.d.ts.map +1 -1
- package/lib/typescript/src/context/ConfigurationProvider.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/services/getProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/services/getProductTypesByQuery.d.ts.map +1 -1
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts.map +1 -1
- package/lib/typescript/src/utils/formatOfferUrl.d.ts +39 -44
- package/lib/typescript/src/utils/formatOfferUrl.d.ts.map +1 -1
- package/lib/typescript/src/utils/getDefaultProductType.d.ts.map +1 -1
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts +3 -3
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts.map +1 -1
- package/lib/typescript/src/utils/getThemeColors.d.ts.map +1 -1
- package/lib/typescript/src/utils/parseStringProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/utils/resolveProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts.map +1 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/lib/typescript/src/version.d.ts.map +1 -1
- package/package.json +81 -135
- package/src/capabilities/configuration/src/userData/types.ts +6 -0
- package/src/capabilities/errors/types/index.ts +4 -2
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.ts +0 -1
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.ts +0 -1
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/index.ts +18 -19
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.ts +0 -1
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.ts +0 -1
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.ts +0 -1
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.ts +0 -1
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.ts +0 -1
- package/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.ts +1 -1
- package/src/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.ts +1939 -1921
- package/src/components/Common/BaseOfferCard/Stat/index.tsx +1 -1
- package/src/components/MoneyLionOfferCarousel.tsx +42 -3
- package/src/components/utils/errorUtils.ts +17 -23
- package/src/index.tsx +4 -0
- package/src/version.ts +2 -2
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js +0 -60
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js +0 -62
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js +0 -31
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js +0 -208
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js +0 -24
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js +0 -40
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js +0 -43
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js +0 -32
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js +0 -69
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js +0 -72
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js +0 -29
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js +0 -46
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js +0 -83
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js +0 -28
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js.map +0 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js +0 -30
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js.map +0 -1
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js +0 -44
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js +0 -59
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js +0 -61
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js +0 -30
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js +0 -207
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js +0 -23
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js +0 -39
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js +0 -42
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js +0 -31
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js +0 -68
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js +0 -71
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js +0 -28
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js +0 -45
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js +0 -82
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js +0 -27
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js.map +0 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js +0 -29
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js.map +0 -1
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js +0 -43
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts +0 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts +0 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts.map +0 -1
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.ts +0 -58
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.ts +0 -60
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.ts +0 -29
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.ts +0 -206
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.ts +0 -22
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.ts +0 -38
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.ts +0 -41
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.ts +0 -30
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.ts +0 -67
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.ts +0 -70
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.ts +0 -27
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.ts +0 -44
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.ts +0 -81
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.ts +0 -26
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.ts +0 -28
- package/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.ts +0 -42
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./Stat"
|
|
1
|
+
export * from "./Stat";
|
|
@@ -7,7 +7,7 @@ import React, {
|
|
|
7
7
|
type SetStateAction,
|
|
8
8
|
} from "react";
|
|
9
9
|
import { localCnfContext } from "../config/mocks/cnfContext";
|
|
10
|
-
import { Text } from "react-native";
|
|
10
|
+
import { Text, View } from "react-native";
|
|
11
11
|
import { getPageData, type GetPageDataParams } from "../pageData";
|
|
12
12
|
import {
|
|
13
13
|
DynamicOffersContainer,
|
|
@@ -65,8 +65,10 @@ export type MoneyLionOfferCarouselProps = {
|
|
|
65
65
|
userData?: UserData;
|
|
66
66
|
} & Omit<EventHandlerContextType, "rateTableUuid" | "leadUuid">;
|
|
67
67
|
|
|
68
|
-
export interface InternalMoneyLionOfferCarouselProps
|
|
69
|
-
|
|
68
|
+
export interface InternalMoneyLionOfferCarouselProps extends Omit<
|
|
69
|
+
MoneyLionOfferCarouselProps,
|
|
70
|
+
"fallbackUI"
|
|
71
|
+
> {
|
|
70
72
|
context: CnfContext | null;
|
|
71
73
|
pageData: any;
|
|
72
74
|
setContext: Dispatch<SetStateAction<CnfContext | null>>;
|
|
@@ -179,6 +181,7 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
179
181
|
searchAPIToken,
|
|
180
182
|
userData: {
|
|
181
183
|
email: userData?.email || "",
|
|
184
|
+
_mockUserCountry: userData?._mockUserCountry || "",
|
|
182
185
|
},
|
|
183
186
|
showProductTypeLabel: _showProductTypeLabel,
|
|
184
187
|
showCardBorder: _showCardBorder,
|
|
@@ -191,6 +194,7 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
191
194
|
_showProductTypeLabel,
|
|
192
195
|
_showCardBorder,
|
|
193
196
|
userData?.email,
|
|
197
|
+
userData?._mockUserCountry,
|
|
194
198
|
]
|
|
195
199
|
);
|
|
196
200
|
|
|
@@ -200,6 +204,16 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
200
204
|
|
|
201
205
|
const isLoading = isFetchingData || isFetchingConfig;
|
|
202
206
|
|
|
207
|
+
const country = (
|
|
208
|
+
userData?._mockUserCountry ||
|
|
209
|
+
context?.signals?.deviceSignals?.country ||
|
|
210
|
+
""
|
|
211
|
+
)
|
|
212
|
+
.trim()
|
|
213
|
+
.toUpperCase();
|
|
214
|
+
|
|
215
|
+
const isNonUSCountry = country !== "US";
|
|
216
|
+
|
|
203
217
|
useEffect(() => {
|
|
204
218
|
const fetchConfiguration = async () => {
|
|
205
219
|
try {
|
|
@@ -274,6 +288,11 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
274
288
|
const fetchPageData = async () => {
|
|
275
289
|
// Should only fetch data if context is done fetching
|
|
276
290
|
if (context && !isFetchingConfig) {
|
|
291
|
+
if (isNonUSCountry) {
|
|
292
|
+
setIsFetchingData(false);
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
|
|
277
296
|
try {
|
|
278
297
|
setIsFetchingData(true);
|
|
279
298
|
const data = await getPageData({
|
|
@@ -344,6 +363,26 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
344
363
|
return <Text>{"Context is null"}</Text>;
|
|
345
364
|
}
|
|
346
365
|
|
|
366
|
+
if (isNonUSCountry) {
|
|
367
|
+
return (
|
|
368
|
+
<View
|
|
369
|
+
style={{
|
|
370
|
+
alignItems: "center",
|
|
371
|
+
justifyContent: "center",
|
|
372
|
+
paddingVertical: 36,
|
|
373
|
+
}}
|
|
374
|
+
>
|
|
375
|
+
<Text
|
|
376
|
+
style={{
|
|
377
|
+
color: isDarkTheme ? "#FFFFFF" : "#111111",
|
|
378
|
+
}}
|
|
379
|
+
>
|
|
380
|
+
{"This service is not available in your country"}
|
|
381
|
+
</Text>
|
|
382
|
+
</View>
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
|
|
347
386
|
if (!pageData) {
|
|
348
387
|
return <DynamicOfferSkeleton />;
|
|
349
388
|
}
|
|
@@ -20,13 +20,13 @@ export const getCustomApiErrorStatusCode = (error: unknown): number | null => {
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Builds API error log properties from an error object.
|
|
23
|
-
* Checks if the error is a network error, and categorizes it as:
|
|
23
|
+
* Checks if the error is a network error (HTTP 4xx or 5xx), and categorizes it as:
|
|
24
24
|
* - Client-side error (4xx status codes)
|
|
25
25
|
* - Server-side error (5xx status codes)
|
|
26
|
-
*
|
|
26
|
+
*
|
|
27
|
+
* Non-error HTTP status codes (2xx, 3xx) are not classified as network errors.
|
|
27
28
|
*
|
|
28
29
|
* @param error - The error object (can be any type)
|
|
29
|
-
* @param message - The error message to include in the log properties
|
|
30
30
|
* @returns InternalMoneyLionOfferCarouselError object if it's a network error, null otherwise
|
|
31
31
|
*/
|
|
32
32
|
export const getApiErrorLogProperties = (
|
|
@@ -41,30 +41,24 @@ export const getApiErrorLogProperties = (
|
|
|
41
41
|
error,
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
52
|
-
} else if (statusCode >= 500 && statusCode < 600) {
|
|
53
|
-
// 5xx - Server error
|
|
54
|
-
return {
|
|
55
|
-
...logProperties,
|
|
56
|
-
statusCode,
|
|
57
|
-
code: ErrorCodes.NETWORK_SERVER_ERROR,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
// Other status codes
|
|
44
|
+
// Not a network error (no status code, or status code < 400)
|
|
45
|
+
if (!statusCode || statusCode < 400) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// 4xx - Request error (client-side)
|
|
50
|
+
if (statusCode < 500) {
|
|
61
51
|
return {
|
|
62
52
|
...logProperties,
|
|
63
53
|
statusCode,
|
|
64
|
-
code: ErrorCodes.
|
|
54
|
+
code: ErrorCodes.NETWORK_REQUEST_ERROR,
|
|
65
55
|
};
|
|
66
56
|
}
|
|
67
57
|
|
|
68
|
-
//
|
|
69
|
-
return
|
|
58
|
+
// 5xx - Server error
|
|
59
|
+
return {
|
|
60
|
+
...logProperties,
|
|
61
|
+
statusCode,
|
|
62
|
+
code: ErrorCodes.NETWORK_SERVER_ERROR,
|
|
63
|
+
};
|
|
70
64
|
};
|
package/src/index.tsx
CHANGED
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export const VERSION =
|
|
1
|
+
// Version is kept in sync with package.json via the sync-version script
|
|
2
|
+
export const VERSION = "1.8.8";
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// import { describe, expect, it } from "vitest";
|
|
2
|
-
// import { type BooleanStat, fromBooleanStat } from "./boolean";
|
|
3
|
-
|
|
4
|
-
// describe("fromBooleanStat", () => {
|
|
5
|
-
// it.each([
|
|
6
|
-
// [
|
|
7
|
-
// { isAvailable: true },
|
|
8
|
-
// { format: "boolean", label: "Availability", fieldName: "isAvailable" },
|
|
9
|
-
// { label: "Availability", content: "True" },
|
|
10
|
-
// ],
|
|
11
|
-
// [
|
|
12
|
-
// { isAvailable: false },
|
|
13
|
-
// { format: "boolean", label: "Availability", fieldName: "isAvailable" },
|
|
14
|
-
// { label: "Availability", content: "False" },
|
|
15
|
-
// ],
|
|
16
|
-
// [
|
|
17
|
-
// { isAvailable: true },
|
|
18
|
-
// {
|
|
19
|
-
// format: "boolean",
|
|
20
|
-
// label: "Availability",
|
|
21
|
-
// fieldName: "isAvailable",
|
|
22
|
-
// trueValue: "In Stock",
|
|
23
|
-
// },
|
|
24
|
-
// { label: "Availability", content: "In Stock" },
|
|
25
|
-
// ],
|
|
26
|
-
// [
|
|
27
|
-
// { isAvailable: false },
|
|
28
|
-
// {
|
|
29
|
-
// format: "boolean",
|
|
30
|
-
// label: "Availability",
|
|
31
|
-
// fieldName: "isAvailable",
|
|
32
|
-
// falseValue: "Out of Stock",
|
|
33
|
-
// },
|
|
34
|
-
// { label: "Availability", content: "Out of Stock" },
|
|
35
|
-
// ],
|
|
36
|
-
// [
|
|
37
|
-
// {},
|
|
38
|
-
// { format: "boolean", label: "Availability", fieldName: "isAvailable" },
|
|
39
|
-
// { label: "Availability", content: "False" },
|
|
40
|
-
// ],
|
|
41
|
-
// [
|
|
42
|
-
// {},
|
|
43
|
-
// {
|
|
44
|
-
// format: "boolean",
|
|
45
|
-
// label: "Availability",
|
|
46
|
-
// fieldName: "isAvailable",
|
|
47
|
-
// falseValue: "Unavailable",
|
|
48
|
-
// },
|
|
49
|
-
// { label: "Availability", content: "Unavailable" },
|
|
50
|
-
// ],
|
|
51
|
-
// ])(
|
|
52
|
-
// "should return the correct content for offer %j and stat %j",
|
|
53
|
-
// (offer, stats, expected) => {
|
|
54
|
-
// const result = fromBooleanStat(offer as BaseOffer)(stats as BooleanStat);
|
|
55
|
-
// expect(result).toEqual(expected);
|
|
56
|
-
// }
|
|
57
|
-
// );
|
|
58
|
-
// });
|
|
59
|
-
"use strict";
|
|
60
|
-
//# sourceMappingURL=boolean.spec.js.map
|
package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.ts"],"mappings":"AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// import type { BaseOffer } from '@capabilities/offer-catalog'
|
|
2
|
-
// import { describe, expect, it } from 'vitest'
|
|
3
|
-
// import { fromCommonStat } from './common'
|
|
4
|
-
|
|
5
|
-
// describe('fromCommonStat', () => {
|
|
6
|
-
// it.each([
|
|
7
|
-
// [{ title: 'special offer' }, 'Offer Title', 'special offer'],
|
|
8
|
-
// [{}, 'Missing Field', ''],
|
|
9
|
-
// ])('should return the correct content for offer %j', (offer, label, content) => {
|
|
10
|
-
// const result = fromCommonStat(offer as unknown as BaseOffer)({
|
|
11
|
-
// label,
|
|
12
|
-
// fieldName: 'title',
|
|
13
|
-
// format: 'common',
|
|
14
|
-
// })
|
|
15
|
-
// expect(result).toEqual({
|
|
16
|
-
// label,
|
|
17
|
-
// content,
|
|
18
|
-
// })
|
|
19
|
-
// })
|
|
20
|
-
|
|
21
|
-
// it.each([
|
|
22
|
-
// [{ title: 'special offer' }, 'Static Value', 'Special offer'],
|
|
23
|
-
// [{ title: 'limited time only' }, 'Description', 'Limited time only'],
|
|
24
|
-
// ])(
|
|
25
|
-
// 'should return the correct content for offer %j and capitalized',
|
|
26
|
-
// (offer, label, content) => {
|
|
27
|
-
// const result = fromCommonStat(offer as unknown as BaseOffer)({
|
|
28
|
-
// label,
|
|
29
|
-
// fieldName: 'title',
|
|
30
|
-
// format: 'common',
|
|
31
|
-
// capitalized: true,
|
|
32
|
-
// })
|
|
33
|
-
// expect(result).toEqual({
|
|
34
|
-
// label,
|
|
35
|
-
// content,
|
|
36
|
-
// })
|
|
37
|
-
// },
|
|
38
|
-
// )
|
|
39
|
-
|
|
40
|
-
// it.each([
|
|
41
|
-
// [{ score: 600 }, '600'],
|
|
42
|
-
// [{ score: undefined }, 'No minimum'],
|
|
43
|
-
// ])(
|
|
44
|
-
// 'should return the correct content for offer %j with the default value and fieldName',
|
|
45
|
-
// (offer, content) => {
|
|
46
|
-
// const result = fromCommonStat(offer as unknown as BaseOffer)({
|
|
47
|
-
// label: 'Minimum Credit Score',
|
|
48
|
-
// fieldName: 'score',
|
|
49
|
-
// format: 'common',
|
|
50
|
-
// defaultValue: 'No minimum',
|
|
51
|
-
// capitalized: true,
|
|
52
|
-
// })
|
|
53
|
-
|
|
54
|
-
// expect(result).toEqual({
|
|
55
|
-
// label: 'Minimum Credit Score',
|
|
56
|
-
// content,
|
|
57
|
-
// })
|
|
58
|
-
// },
|
|
59
|
-
// )
|
|
60
|
-
// })
|
|
61
|
-
"use strict";
|
|
62
|
-
//# sourceMappingURL=common.spec.js.map
|
package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/common.spec.ts"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
|
package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// import type { BaseOffer } from '@capabilities/offer-catalog'
|
|
2
|
-
// import { describe, expect, it } from 'vitest'
|
|
3
|
-
// import { creditBureaus } from './creditBureaus' // Update this to the correct file path
|
|
4
|
-
|
|
5
|
-
// describe('creditBureaus', () => {
|
|
6
|
-
// it.each([
|
|
7
|
-
// [
|
|
8
|
-
// { bureaus: ['Experian', 'Equifax', 'TransUnion'] },
|
|
9
|
-
// 'Bureaus',
|
|
10
|
-
// 'All 3 Major Bureaus',
|
|
11
|
-
// ],
|
|
12
|
-
// [{ bureaus: ['Experian', 'Equifax'] }, 'Bureaus', 'Experian & Equifax'],
|
|
13
|
-
// [{ bureaus: ['Experian'] }, 'Bureaus', 'Experian'],
|
|
14
|
-
// [{ bureaus: [] }, 'Bureaus', 'N/A'],
|
|
15
|
-
// [{}, 'Bureaus', 'N/A'],
|
|
16
|
-
// [{ bureaus: undefined }, 'Bureaus', 'N/A'],
|
|
17
|
-
// [{ bureaus: null }, 'Bureaus', 'N/A'], // Added test case for null bureaus
|
|
18
|
-
// ])('should return the correct content for offer %j', (offer, label, content) => {
|
|
19
|
-
// const result = creditBureaus(offer as BaseOffer)({
|
|
20
|
-
// label,
|
|
21
|
-
// fieldName: 'bureaus',
|
|
22
|
-
// format: 'BureausStat',
|
|
23
|
-
// })
|
|
24
|
-
// expect(result).toEqual({
|
|
25
|
-
// label,
|
|
26
|
-
// content,
|
|
27
|
-
// })
|
|
28
|
-
// })
|
|
29
|
-
// })
|
|
30
|
-
"use strict";
|
|
31
|
-
//# sourceMappingURL=creditBureaus.spec.js.map
|
package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.ts"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
|
package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
// import type { BaseOffer } from '@capabilities/offer-catalog'
|
|
2
|
-
// import { describe, expect, it, vi } from 'vitest'
|
|
3
|
-
// import {
|
|
4
|
-
// type RangeCurrencyOrBasisStat,
|
|
5
|
-
// fromRangeCurrencyOrBasisStat,
|
|
6
|
-
// } from './currencyOrBasis'
|
|
7
|
-
|
|
8
|
-
// const cashAdvanceOffer: BaseOffer = {
|
|
9
|
-
// productVersions: [1],
|
|
10
|
-
// descriptionPoints: [
|
|
11
|
-
// 'Get approved instantly* for a Cash Advance from $10 to $300',
|
|
12
|
-
// 'Pay no interest or late fees — there’s no credit check either',
|
|
13
|
-
// 'Find out how much you qualify for now',
|
|
14
|
-
// ],
|
|
15
|
-
// fastTransferFeeBasisPointsMin: 0,
|
|
16
|
-
// uuid: '952c00ee-c1ab-4f1e-91ba-06d1a2d53ab1',
|
|
17
|
-
// amountCentsMax: 30000,
|
|
18
|
-
// createdAt: '2024-09-23T07:38:25.339782Z',
|
|
19
|
-
// internalName: 'Empower - Cash Advance',
|
|
20
|
-
// unmonetizedUrl: 'https://empower.me/cashadvance/',
|
|
21
|
-
// recommendationScore: 1,
|
|
22
|
-
// monetizedUrl:
|
|
23
|
-
// 'https://empower.onelink.me/GQnh/snwhc1rs?af_sub1=[LEAD_UUID]&af_sub2=[COMPANY_UUID]&af_sub4=network',
|
|
24
|
-
// headline: 'Top-rated Empower app delivers up to $300 Cash Advances*',
|
|
25
|
-
// productType: 'CashAdvance',
|
|
26
|
-
// updatedAt: '2024-09-23T07:38:25.339782Z',
|
|
27
|
-
// monthlyFeeCentsMin: 800,
|
|
28
|
-
// fastTransferFeeCentsMax: 0,
|
|
29
|
-
// version: 2,
|
|
30
|
-
// url: 'https://offers.moneylion.com/ref/ee0e415f-ca65-440b-b9c1-301e25089a1f',
|
|
31
|
-
// demandSubAccountUuid: '1fb97335-7793-4fab-90f2-be5f8b0bc29e',
|
|
32
|
-
// legalLanguage:
|
|
33
|
-
// '*Not everyone will qualify for a Cash Advance offer. Offer amounts range from $10 - $300. As of 3/31/2024, the average offer amount is $145. Instant delivery fees may apply. See Terms.',
|
|
34
|
-
// fastTransferFeeBasisPointsMax: 0,
|
|
35
|
-
// fastTransferFeeCentsMin: 0,
|
|
36
|
-
// productDisplayName: 'Cash Advance',
|
|
37
|
-
// monthlyFeeCentsMax: 800,
|
|
38
|
-
// amountCentsMin: 1000,
|
|
39
|
-
// demandSubAccountImageUrl:
|
|
40
|
-
// 'https://s3.amazonaws.com/images.evenfinancial.com/logos/dev/empower_thrive_-_cpa-425-wtxnb6m5.svg',
|
|
41
|
-
// status: 'active',
|
|
42
|
-
// demandSubAccountDisplayName: 'Empower Thrive',
|
|
43
|
-
// isMonetized: true,
|
|
44
|
-
// financialInstitutionUuid: '1fb97335-7793-4fab-90f2-be5f8b0bc29e',
|
|
45
|
-
// financialInstitutionImageUrl:
|
|
46
|
-
// 'https://s3.amazonaws.com/images.evenfinancial.com/logos/dev/empower_thrive_-_cpa-425-wtxnb6m5.svg',
|
|
47
|
-
// financialInstitutionDisplayName: 'Empower Thrive',
|
|
48
|
-
// }
|
|
49
|
-
|
|
50
|
-
// describe('fromRangeCurrencyOrBasisStat', () => {
|
|
51
|
-
// const label = 'Test Label'
|
|
52
|
-
// const options: RangeCurrencyOrBasisStat = {
|
|
53
|
-
// format: 'rangeCurrencyOrBasis',
|
|
54
|
-
// label,
|
|
55
|
-
// initialFieldNameCurrency: 'monthlyFeeCentsMin',
|
|
56
|
-
// endFieldNameCurrency: 'monthlyFeeCentsMax',
|
|
57
|
-
// initialFieldNameBasisPoints: 'fastTransferFeeBasisPointsMin',
|
|
58
|
-
// endFieldNameBasisPoints: 'fastTransferFeeBasisPointsMax',
|
|
59
|
-
// }
|
|
60
|
-
|
|
61
|
-
// // Mock the `get` function from 'radash'
|
|
62
|
-
// vi.mock('radash', () => ({
|
|
63
|
-
// get: (obj: any, path: string, defaultValue?: any) => {
|
|
64
|
-
// const value = obj[path]
|
|
65
|
-
// return value !== undefined ? value : defaultValue
|
|
66
|
-
// },
|
|
67
|
-
// }))
|
|
68
|
-
|
|
69
|
-
// vi.mock('@capabilities/offer-catalog', () => {
|
|
70
|
-
// const mockFormatRange = (
|
|
71
|
-
// value1: number | undefined,
|
|
72
|
-
// value2: number | undefined,
|
|
73
|
-
// type: 'amount' | 'percentage',
|
|
74
|
-
// ) => {
|
|
75
|
-
// if (value1 == null && value2 == null) return 'N/A'
|
|
76
|
-
// if (value1 === 0 && value2 === 0) return 'FREE'
|
|
77
|
-
// if (value1 != null && value2 != null && value1 === value2)
|
|
78
|
-
// return `${value1} ${type}`
|
|
79
|
-
// if (value1 != null && value2 != null) return `${value1}-${value2} ${type}`
|
|
80
|
-
// if (value1 != null) return `${value1} ${type}`
|
|
81
|
-
// if (value2 != null) return `${value2} ${type}`
|
|
82
|
-
// return 'N/A'
|
|
83
|
-
// }
|
|
84
|
-
|
|
85
|
-
// return {
|
|
86
|
-
// formatRange: mockFormatRange,
|
|
87
|
-
// }
|
|
88
|
-
// })
|
|
89
|
-
|
|
90
|
-
// it('returns formatted content based on cashAdvanceOffer data', () => {
|
|
91
|
-
// const result = fromRangeCurrencyOrBasisStat(cashAdvanceOffer)(options)
|
|
92
|
-
// expect(result).toEqual({ label, content: '800 amount' })
|
|
93
|
-
// })
|
|
94
|
-
|
|
95
|
-
// it('returns FREE when all relevant values are zero in cashAdvanceOffer', () => {
|
|
96
|
-
// const offerWithZeros = {
|
|
97
|
-
// ...cashAdvanceOffer,
|
|
98
|
-
// monthlyFeeCentsMin: 0,
|
|
99
|
-
// monthlyFeeCentsMax: 0,
|
|
100
|
-
// fastTransferFeeBasisPointsMin: 0,
|
|
101
|
-
// fastTransferFeeBasisPointsMax: 0,
|
|
102
|
-
// }
|
|
103
|
-
// const result = fromRangeCurrencyOrBasisStat(offerWithZeros)(options)
|
|
104
|
-
// expect(result).toEqual({ label, content: 'FREE' })
|
|
105
|
-
// })
|
|
106
|
-
|
|
107
|
-
// it('returns N/A when all relevant values are undefined in cashAdvanceOffer', () => {
|
|
108
|
-
// const offerWithUndefineds = {
|
|
109
|
-
// ...cashAdvanceOffer,
|
|
110
|
-
// monthlyFeeCentsMin: undefined,
|
|
111
|
-
// monthlyFeeCentsMax: undefined,
|
|
112
|
-
// fastTransferFeeBasisPointsMin: undefined,
|
|
113
|
-
// fastTransferFeeBasisPointsMax: undefined,
|
|
114
|
-
// }
|
|
115
|
-
// const result = fromRangeCurrencyOrBasisStat(offerWithUndefineds)(options)
|
|
116
|
-
// expect(result).toEqual({ label, content: 'N/A' })
|
|
117
|
-
// })
|
|
118
|
-
|
|
119
|
-
// it('returns basis points range when currency values are zero', () => {
|
|
120
|
-
// const offerWithZeroCurrency = {
|
|
121
|
-
// ...cashAdvanceOffer,
|
|
122
|
-
// monthlyFeeCentsMin: 0,
|
|
123
|
-
// monthlyFeeCentsMax: 0,
|
|
124
|
-
// fastTransferFeeBasisPointsMin: 100,
|
|
125
|
-
// fastTransferFeeBasisPointsMax: 200,
|
|
126
|
-
// }
|
|
127
|
-
// const result = fromRangeCurrencyOrBasisStat(offerWithZeroCurrency)(options)
|
|
128
|
-
// expect(result).toEqual({ label, content: '100-200 percentage' })
|
|
129
|
-
// })
|
|
130
|
-
|
|
131
|
-
// it('returns both currency and basis points ranges when both are defined', () => {
|
|
132
|
-
// const offerWithAllValues = {
|
|
133
|
-
// ...cashAdvanceOffer,
|
|
134
|
-
// monthlyFeeCentsMin: 500,
|
|
135
|
-
// monthlyFeeCentsMax: 1000,
|
|
136
|
-
// fastTransferFeeBasisPointsMin: 50,
|
|
137
|
-
// fastTransferFeeBasisPointsMax: 75,
|
|
138
|
-
// }
|
|
139
|
-
// const result = fromRangeCurrencyOrBasisStat(offerWithAllValues)(options)
|
|
140
|
-
// expect(result).toEqual({
|
|
141
|
-
// label,
|
|
142
|
-
// content: '500-1000 amount or 50-75 percentage',
|
|
143
|
-
// })
|
|
144
|
-
// })
|
|
145
|
-
|
|
146
|
-
// it('handles single value ranges for currency in cashAdvanceOffer', () => {
|
|
147
|
-
// const offerWithSingleCurrency = {
|
|
148
|
-
// ...cashAdvanceOffer,
|
|
149
|
-
// monthlyFeeCentsMin: 600,
|
|
150
|
-
// monthlyFeeCentsMax: 600,
|
|
151
|
-
// }
|
|
152
|
-
// const result = fromRangeCurrencyOrBasisStat(offerWithSingleCurrency)(options)
|
|
153
|
-
// expect(result).toEqual({ label, content: '600 amount' })
|
|
154
|
-
// })
|
|
155
|
-
|
|
156
|
-
// it('handles missing end values gracefully in cashAdvanceOffer', () => {
|
|
157
|
-
// const offerWithMissingEndValues = {
|
|
158
|
-
// ...cashAdvanceOffer,
|
|
159
|
-
// monthlyFeeCentsMin: 700,
|
|
160
|
-
// monthlyFeeCentsMax: undefined,
|
|
161
|
-
// fastTransferFeeBasisPointsMin: 25,
|
|
162
|
-
// fastTransferFeeBasisPointsMax: undefined,
|
|
163
|
-
// }
|
|
164
|
-
// const result = fromRangeCurrencyOrBasisStat(offerWithMissingEndValues)(options)
|
|
165
|
-
// expect(result).toEqual({
|
|
166
|
-
// label,
|
|
167
|
-
// content: '700 amount or 25 percentage',
|
|
168
|
-
// })
|
|
169
|
-
// })
|
|
170
|
-
|
|
171
|
-
// it('excludes FREE or N/A from content if formatRange returns them', () => {
|
|
172
|
-
// const offerWithFreeCurrency = {
|
|
173
|
-
// ...cashAdvanceOffer,
|
|
174
|
-
// monthlyFeeCentsMin: 0,
|
|
175
|
-
// monthlyFeeCentsMax: 0,
|
|
176
|
-
// fastTransferFeeBasisPointsMin: 15,
|
|
177
|
-
// fastTransferFeeBasisPointsMax: 15,
|
|
178
|
-
// }
|
|
179
|
-
// const result = fromRangeCurrencyOrBasisStat(offerWithFreeCurrency)(options)
|
|
180
|
-
// expect(result).toEqual({ label, content: '15 percentage' })
|
|
181
|
-
// })
|
|
182
|
-
|
|
183
|
-
// it('prefers basis points when currency comparison is FREE or N/A', () => {
|
|
184
|
-
// const offerWithNoCurrency = {
|
|
185
|
-
// ...cashAdvanceOffer,
|
|
186
|
-
// monthlyFeeCentsMin: undefined,
|
|
187
|
-
// monthlyFeeCentsMax: undefined,
|
|
188
|
-
// fastTransferFeeBasisPointsMin: 20,
|
|
189
|
-
// fastTransferFeeBasisPointsMax: 25,
|
|
190
|
-
// }
|
|
191
|
-
// const result = fromRangeCurrencyOrBasisStat(offerWithNoCurrency)(options)
|
|
192
|
-
// expect(result).toEqual({ label, content: '20-25 percentage' })
|
|
193
|
-
// })
|
|
194
|
-
|
|
195
|
-
// it('returns N/A when formatRange returns N/A for both currency and basis points', () => {
|
|
196
|
-
// const offerWithNoValues = {
|
|
197
|
-
// ...cashAdvanceOffer,
|
|
198
|
-
// monthlyFeeCentsMin: undefined,
|
|
199
|
-
// monthlyFeeCentsMax: undefined,
|
|
200
|
-
// fastTransferFeeBasisPointsMin: undefined,
|
|
201
|
-
// fastTransferFeeBasisPointsMax: undefined,
|
|
202
|
-
// }
|
|
203
|
-
// const result = fromRangeCurrencyOrBasisStat(offerWithNoValues)(options)
|
|
204
|
-
// expect(result).toEqual({ label, content: 'N/A' })
|
|
205
|
-
// })
|
|
206
|
-
// })
|
|
207
|
-
"use strict";
|
|
208
|
-
//# sourceMappingURL=currencyOrBasis.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
|
package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// import type { BaseOffer } from '@capabilities/offer-catalog'
|
|
2
|
-
// import { describe, expect, it } from 'vitest'
|
|
3
|
-
// import { fromFreeTrialStat } from './freeTrialDays' // Update this to the correct file path
|
|
4
|
-
|
|
5
|
-
// describe('fromFreeTrialStat', () => {
|
|
6
|
-
// it.each([
|
|
7
|
-
// [{ freeTrialDays: 14 }, 'Free Trial', '14 Days'],
|
|
8
|
-
// [{ freeTrialDays: 0 }, 'Free Trial', 'No'],
|
|
9
|
-
// [{}, 'Free Trial', 'No'],
|
|
10
|
-
// [{ freeTrialDays: undefined }, 'Free Trial', 'No'],
|
|
11
|
-
// [{ freeTrialDays: 30 }, 'Try for Free', '30 Days'],
|
|
12
|
-
// ])('should return the correct content for offer %j', (offer, label, content) => {
|
|
13
|
-
// const result = fromFreeTrialStat(offer as BaseOffer)({
|
|
14
|
-
// label,
|
|
15
|
-
// format: 'freeTrial',
|
|
16
|
-
// })
|
|
17
|
-
// expect(result).toEqual({
|
|
18
|
-
// label,
|
|
19
|
-
// content,
|
|
20
|
-
// })
|
|
21
|
-
// })
|
|
22
|
-
// })
|
|
23
|
-
"use strict";
|
|
24
|
-
//# sourceMappingURL=freeTrialDays.spec.js.map
|
package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.ts"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// import { describe, expect, it } from "vitest";
|
|
2
|
-
// import type { BaseOffer } from "../../../types/offerCatalogSchema";
|
|
3
|
-
// import { fromListStringWithAnd } from "./fromListStringWithAnd";
|
|
4
|
-
|
|
5
|
-
// describe("creditBurauReports", () => {
|
|
6
|
-
// it.each([
|
|
7
|
-
// [
|
|
8
|
-
// { creditBureauReporting: ["Experian", "Equifax", "TransUnion"] },
|
|
9
|
-
// "Credit Bureau Reporting",
|
|
10
|
-
// "Experian, Equifax & TransUnion",
|
|
11
|
-
// ],
|
|
12
|
-
// [
|
|
13
|
-
// { creditBureauReporting: ["Experian", "Equifax"] },
|
|
14
|
-
// "Credit Bureau Reporting",
|
|
15
|
-
// "Experian & Equifax",
|
|
16
|
-
// ],
|
|
17
|
-
// [
|
|
18
|
-
// { creditBureauReporting: ["Experian"] },
|
|
19
|
-
// "Credit Bureau Reporting",
|
|
20
|
-
// "Experian",
|
|
21
|
-
// ],
|
|
22
|
-
// [{ creditBureauReporting: [] }, "Credit Bureau Reporting", "N/A"],
|
|
23
|
-
// [{ creditBureauReporting: undefined }, "Credit Bureau Reporting", "N/A"],
|
|
24
|
-
// ])(
|
|
25
|
-
// "should return the correct content for offer %j",
|
|
26
|
-
// (offer, label, content) => {
|
|
27
|
-
// const result = fromListStringWithAnd(offer as unknown as BaseOffer)({
|
|
28
|
-
// // label,
|
|
29
|
-
// format: "listStringWithAnd",
|
|
30
|
-
// fieldName: "creditBureauReporting",
|
|
31
|
-
// });
|
|
32
|
-
// expect(result).toEqual({
|
|
33
|
-
// label,
|
|
34
|
-
// content,
|
|
35
|
-
// });
|
|
36
|
-
// }
|
|
37
|
-
// );
|
|
38
|
-
// });
|
|
39
|
-
"use strict";
|
|
40
|
-
//# sourceMappingURL=fromListStringWithAnd.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.ts"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
|