@moneylion/react-native-offer-carousel 1.10.1 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/commonjs/capabilities/configuration/src/brands/checkVisualEligibility.js +13 -11
- package/lib/commonjs/capabilities/configuration/src/brands/checkVisualEligibility.js.map +1 -1
- package/lib/commonjs/capabilities/configuration/src/brands/createDerivedBrands.js +8 -19
- package/lib/commonjs/capabilities/configuration/src/brands/createDerivedBrands.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/formatUtils.js +36 -21
- package/lib/commonjs/capabilities/offer-catalog/src/utils/formatUtils.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js +7 -30
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js +15 -17
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js +8 -2
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/index.js +40 -38
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/index.js.map +1 -1
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js +22 -12
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js.map +1 -1
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js +120 -116
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -1
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/index.js +8 -30
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/index.js.map +1 -1
- package/lib/commonjs/components/DynamicOffers/Render/Offer.js +51 -49
- package/lib/commonjs/components/DynamicOffers/Render/Offer.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/capabilities/configuration/src/brands/checkVisualEligibility.js +13 -11
- package/lib/module/capabilities/configuration/src/brands/checkVisualEligibility.js.map +1 -1
- package/lib/module/capabilities/configuration/src/brands/createDerivedBrands.js +7 -19
- package/lib/module/capabilities/configuration/src/brands/createDerivedBrands.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/formatUtils.js +35 -20
- package/lib/module/capabilities/offer-catalog/src/utils/formatUtils.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js +7 -30
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js +15 -17
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js +8 -2
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/utils/stats/index.js +40 -38
- package/lib/module/capabilities/offer-catalog/src/utils/stats/index.js.map +1 -1
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js +22 -11
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js.map +1 -1
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js +120 -115
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -1
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/index.js +9 -31
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/index.js.map +1 -1
- package/lib/module/components/DynamicOffers/Render/Offer.js +51 -49
- package/lib/module/components/DynamicOffers/Render/Offer.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +1 -1
- package/lib/typescript/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +1 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +1 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +1 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +1 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +1 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +1 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts +4 -192
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +1 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/components.d.ts +12 -3
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +1 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +1 -1
- package/lib/typescript/components/DynamicOffers/Render/Offer.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +3 -8
- package/src/capabilities/configuration/src/brands/checkVisualEligibility.ts +22 -16
- package/src/capabilities/configuration/src/brands/createDerivedBrands.ts +10 -23
- package/src/capabilities/offer-catalog/src/utils/formatUtils.ts +38 -19
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.ts +19 -46
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.ts +17 -21
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.ts +11 -8
- package/src/capabilities/offer-catalog/src/utils/stats/index.ts +40 -109
- package/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.ts +26 -17
- package/src/capabilities/ui/elements/src/components/MarkdownText/components.tsx +157 -142
- package/src/capabilities/ui/elements/src/components/MarkdownText/index.tsx +11 -33
- package/src/components/DynamicOffers/Render/Offer.tsx +34 -33
- package/src/version.ts +1 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React, { Fragment } from "react";
|
|
2
2
|
|
|
3
|
-
import { match } from "ts-pattern";
|
|
4
|
-
|
|
5
3
|
import type { ProductTypeBuilder } from "../../../builder";
|
|
6
4
|
import {
|
|
7
5
|
DefaultOfferCard,
|
|
@@ -58,63 +56,66 @@ export const Offer = ({
|
|
|
58
56
|
return <></>;
|
|
59
57
|
}
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
const renderCard = () => {
|
|
60
|
+
if (!builder) {
|
|
61
|
+
if (!fallbackTemplate) return <></>;
|
|
62
|
+
const FallbackTemplate = fallbackTemplate;
|
|
63
|
+
return (
|
|
64
|
+
<FallbackTemplate
|
|
65
|
+
showCardBorder={showCardBorder}
|
|
66
|
+
offerIndex={offerIndex}
|
|
67
|
+
key={`${offerIndex}-${offer.uuid}`}
|
|
68
|
+
offer={offer}
|
|
69
|
+
showProductTypeLabel={showProductTypeLabel}
|
|
70
|
+
fullCardWidth={fullCardWidth}
|
|
71
|
+
isHorizontalScroll={isHorizontalScroll}
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
switch (builder.layout) {
|
|
76
|
+
case "defaultOfferCard":
|
|
77
|
+
return (
|
|
65
78
|
<DefaultOfferCard
|
|
66
79
|
offerIndex={offerIndex}
|
|
67
80
|
key={`${offerIndex}-${offer.uuid}`}
|
|
68
81
|
offer={offer}
|
|
69
|
-
productTypeBuilder={
|
|
82
|
+
productTypeBuilder={builder}
|
|
70
83
|
showCardBorder={showCardBorder}
|
|
71
84
|
showProductTypeLabel={showProductTypeLabel}
|
|
72
85
|
fullCardWidth={fullCardWidth}
|
|
73
86
|
isHorizontalScroll={isHorizontalScroll}
|
|
74
87
|
/>
|
|
75
|
-
)
|
|
76
|
-
|
|
88
|
+
);
|
|
89
|
+
case "creditCardOfferCard":
|
|
90
|
+
return (
|
|
77
91
|
<CreditCardOfferCard
|
|
78
92
|
offerIndex={offerIndex}
|
|
79
93
|
key={`${offerIndex}-${offer.uuid}`}
|
|
80
94
|
offer={offer}
|
|
81
|
-
productTypeBuilder={
|
|
95
|
+
productTypeBuilder={builder}
|
|
82
96
|
showCardBorder={showCardBorder}
|
|
83
97
|
showProductTypeLabel={showProductTypeLabel}
|
|
84
98
|
fullCardWidth={fullCardWidth}
|
|
85
99
|
isHorizontalScroll={isHorizontalScroll}
|
|
86
100
|
/>
|
|
87
|
-
)
|
|
88
|
-
|
|
101
|
+
);
|
|
102
|
+
case "headlineWithDescriptionCard":
|
|
103
|
+
return (
|
|
89
104
|
<HeadlineWithDescriptionCard
|
|
90
105
|
offerIndex={offerIndex}
|
|
91
106
|
key={`${offerIndex}-${offer.uuid}`}
|
|
92
107
|
offer={offer}
|
|
93
|
-
productTypeBuilder={
|
|
108
|
+
productTypeBuilder={builder}
|
|
94
109
|
showCardBorder={showCardBorder}
|
|
95
110
|
showProductTypeLabel={showProductTypeLabel}
|
|
96
111
|
fullCardWidth={fullCardWidth}
|
|
97
112
|
isHorizontalScroll={isHorizontalScroll}
|
|
98
113
|
/>
|
|
99
|
-
)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
return (
|
|
106
|
-
<FallbackTemplate
|
|
107
|
-
showCardBorder={showCardBorder}
|
|
108
|
-
offerIndex={offerIndex}
|
|
109
|
-
key={`${offerIndex}-${offer.uuid}`}
|
|
110
|
-
offer={offer}
|
|
111
|
-
showProductTypeLabel={showProductTypeLabel}
|
|
112
|
-
fullCardWidth={fullCardWidth}
|
|
113
|
-
isHorizontalScroll={isHorizontalScroll}
|
|
114
|
-
/>
|
|
115
|
-
);
|
|
116
|
-
})
|
|
117
|
-
.exhaustive()}
|
|
118
|
-
</Fragment>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<Fragment key={`${offerIndex}-${offer.uuid}`}>{renderCard()}</Fragment>
|
|
119
120
|
);
|
|
120
121
|
});
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Version is kept in sync with package.json via the sync-version script
|
|
2
|
-
export const VERSION = "1.
|
|
2
|
+
export const VERSION = "1.11.0";
|