@moneylion/react-native-offer-carousel 1.8.8 → 1.9.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/CHANGELOG.md +11 -0
- package/lib/commonjs/apiEnvironment.js +1 -7
- package/lib/commonjs/apiEnvironment.js.map +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/commonjs/components/MoneyLionOfferCarousel.js +3 -8
- package/lib/commonjs/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/commonjs/pageData.js +1 -12
- package/lib/commonjs/pageData.js.map +1 -1
- package/lib/commonjs/services/getDynamicOffers.js +1 -2
- package/lib/commonjs/services/getDynamicOffers.js.map +1 -1
- package/lib/commonjs/services/getProductTypes.js +3 -22
- package/lib/commonjs/services/getProductTypes.js.map +1 -1
- package/lib/commonjs/utils/index.js +0 -11
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/resolveProductTypes.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/apiEnvironment.js +0 -5
- package/lib/module/apiEnvironment.js.map +1 -1
- package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js +3 -8
- package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/module/pageData.js +1 -11
- package/lib/module/pageData.js.map +1 -1
- package/lib/module/services/getDynamicOffers.js +2 -3
- package/lib/module/services/getDynamicOffers.js.map +1 -1
- package/lib/module/services/getProductTypes.js +3 -22
- package/lib/module/services/getProductTypes.js.map +1 -1
- package/lib/module/utils/index.js +0 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/resolveProductTypes.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/src/apiEnvironment.d.ts +0 -4
- package/lib/typescript/src/apiEnvironment.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts +0 -2
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts.map +1 -1
- package/lib/typescript/src/pageData.d.ts +0 -2
- package/lib/typescript/src/pageData.d.ts.map +1 -1
- package/lib/typescript/src/services/getDynamicOffers.d.ts +3 -4
- package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/services/getProductTypes.d.ts +2 -7
- package/lib/typescript/src/services/getProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +0 -1
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/resolveProductTypes.d.ts +0 -5
- package/lib/typescript/src/utils/resolveProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +2 -4
- package/src/apiEnvironment.ts +0 -6
- package/src/components/Common/BaseOfferCard/index.tsx +0 -2
- package/src/components/MoneyLionOfferCarousel.tsx +2 -11
- package/src/pageData.ts +2 -20
- package/src/services/getDynamicOffers.ts +4 -21
- package/src/services/getProductTypes.ts +5 -28
- package/src/utils/index.ts +0 -1
- package/src/utils/resolveProductTypes.ts +0 -5
- package/src/version.ts +1 -1
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js +0 -17
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js.map +0 -1
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +0 -33
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +0 -1
- package/lib/commonjs/components/Cards/VideosCard/VideoContent.js +0 -38
- package/lib/commonjs/components/Cards/VideosCard/VideoContent.js.map +0 -1
- package/lib/commonjs/components/Cards/VideosCard/VideosCard.js +0 -56
- package/lib/commonjs/components/Cards/VideosCard/VideosCard.js.map +0 -1
- package/lib/commonjs/components/Cards/index.js +0 -3
- package/lib/commonjs/components/Cards/index.js.map +0 -1
- package/lib/commonjs/components/Common/BaseOfferCard/ThumbsUpIcon.js +0 -29
- package/lib/commonjs/components/Common/BaseOfferCard/ThumbsUpIcon.js.map +0 -1
- package/lib/commonjs/services/getProductTypesByQuery.js +0 -72
- package/lib/commonjs/services/getProductTypesByQuery.js.map +0 -1
- package/lib/commonjs/utils/selectDynamicOffers.js +0 -13
- package/lib/commonjs/utils/selectDynamicOffers.js.map +0 -1
- package/lib/module/capabilities/core/src/domain/third-party-search/index.js +0 -2
- package/lib/module/capabilities/core/src/domain/third-party-search/index.js.map +0 -1
- package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +0 -26
- package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +0 -1
- package/lib/module/components/Cards/VideosCard/VideoContent.js +0 -37
- package/lib/module/components/Cards/VideosCard/VideoContent.js.map +0 -1
- package/lib/module/components/Cards/VideosCard/VideosCard.js +0 -55
- package/lib/module/components/Cards/VideosCard/VideosCard.js.map +0 -1
- package/lib/module/components/Cards/index.js +0 -2
- package/lib/module/components/Cards/index.js.map +0 -1
- package/lib/module/components/Common/BaseOfferCard/ThumbsUpIcon.js +0 -21
- package/lib/module/components/Common/BaseOfferCard/ThumbsUpIcon.js.map +0 -1
- package/lib/module/services/getProductTypesByQuery.js +0 -65
- package/lib/module/services/getProductTypesByQuery.js.map +0 -1
- package/lib/module/utils/selectDynamicOffers.js +0 -6
- package/lib/module/utils/selectDynamicOffers.js.map +0 -1
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/index.d.ts +0 -2
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/index.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts +0 -19
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +0 -1
- package/lib/typescript/src/components/Cards/VideosCard/VideoContent.d.ts +0 -1
- package/lib/typescript/src/components/Cards/VideosCard/VideoContent.d.ts.map +0 -1
- package/lib/typescript/src/components/Cards/VideosCard/VideosCard.d.ts +0 -1
- package/lib/typescript/src/components/Cards/VideosCard/VideosCard.d.ts.map +0 -1
- package/lib/typescript/src/components/Cards/index.d.ts +0 -1
- package/lib/typescript/src/components/Cards/index.d.ts.map +0 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/ThumbsUpIcon.d.ts +0 -3
- package/lib/typescript/src/components/Common/BaseOfferCard/ThumbsUpIcon.d.ts.map +0 -1
- package/lib/typescript/src/services/getProductTypesByQuery.d.ts +0 -30
- package/lib/typescript/src/services/getProductTypesByQuery.d.ts.map +0 -1
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts +0 -3
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +0 -1
- package/src/capabilities/core/src/domain/third-party-search/index.ts +0 -1
- package/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.ts +0 -33
- package/src/components/Cards/VideosCard/VideoContent.tsx +0 -36
- package/src/components/Cards/VideosCard/VideosCard.tsx +0 -54
- package/src/components/Cards/index.ts +0 -1
- package/src/components/Common/BaseOfferCard/ThumbsUpIcon.tsx +0 -27
- package/src/services/getProductTypesByQuery.ts +0 -76
- package/src/utils/selectDynamicOffers.ts +0 -17
package/lib/module/pageData.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { getIsDevEnvironment } from "./capabilities/offer-catalog/src/utils/contextUtil";
|
|
2
1
|
import { getDynamicOffers } from "./services/getDynamicOffers";
|
|
3
|
-
// import { getDynamicOffers } from "./services/getDynamicOffers";
|
|
4
2
|
import { getDefaultProductType, getProductTypesDefinition, resolveProductTypes } from "./utils";
|
|
5
3
|
import { getEnableUseCachedOffers } from "./utils/getEnableUseCachedOffers";
|
|
6
4
|
export async function getPageData({
|
|
@@ -11,9 +9,7 @@ export async function getPageData({
|
|
|
11
9
|
}) {
|
|
12
10
|
const {
|
|
13
11
|
productType,
|
|
14
|
-
query,
|
|
15
12
|
tags,
|
|
16
|
-
searchAPIToken,
|
|
17
13
|
showProductTypeLabel,
|
|
18
14
|
showCardBorder,
|
|
19
15
|
userData
|
|
@@ -27,7 +23,6 @@ export async function getPageData({
|
|
|
27
23
|
// TODO: Check if this is needed or if we can remove it
|
|
28
24
|
// const parsedStaticProductTypes = parseStringProductTypes(staticProductTypes);
|
|
29
25
|
|
|
30
|
-
const isDev = getIsDevEnvironment(context);
|
|
31
26
|
const {
|
|
32
27
|
productTypesDefinition,
|
|
33
28
|
partnersOverrideDefinition
|
|
@@ -41,11 +36,7 @@ export async function getPageData({
|
|
|
41
36
|
resultType
|
|
42
37
|
} = await resolveProductTypes({
|
|
43
38
|
defaultProductType,
|
|
44
|
-
productType
|
|
45
|
-
query,
|
|
46
|
-
searchAPIToken,
|
|
47
|
-
isDev,
|
|
48
|
-
onError
|
|
39
|
+
productType
|
|
49
40
|
});
|
|
50
41
|
onRateTableSubmit === null || onRateTableSubmit === void 0 || onRateTableSubmit({
|
|
51
42
|
timestamp: new Date().toISOString(),
|
|
@@ -64,7 +55,6 @@ export async function getPageData({
|
|
|
64
55
|
} = await getDynamicOffers({
|
|
65
56
|
tags: safeTags,
|
|
66
57
|
productTypes,
|
|
67
|
-
resultType,
|
|
68
58
|
isCachedOffersRequest,
|
|
69
59
|
productTypesDefinition: [...productTypesDefinition],
|
|
70
60
|
partnersOverrideDefinition: [...partnersOverrideDefinition],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["getDynamicOffers","getDefaultProductType","getProductTypesDefinition","resolveProductTypes","getEnableUseCachedOffers","getPageData","context","params","onRateTableSubmit","onError","productType","tags","showProductTypeLabel","showCardBorder","userData","resolvedTags","trim","isCachedOffersRequest","defaultProductType","productTypesDefinition","partnersOverrideDefinition","currentCountry","signals","deviceSignals","country","safeTags","encodeURI","productTypes","resultType","timestamp","Date","toISOString","offers","isError","leadUuid","rateTableUuid","errorCode"],"sourceRoot":"../../src","sources":["pageData.ts"],"mappings":"AAKA,SAASA,gBAAgB,QAAQ,6BAA6B;AAC9D,SACCC,qBAAqB,EACrBC,yBAAyB,EACzBC,mBAAmB,QACb,SAAS;AAChB,SAASC,wBAAwB,QAAQ,kCAAkC;AAiB3E,OAAO,eAAeC,WAAWA,CAAC;EACjCC,OAAO;EACPC,MAAM;EACNC,iBAAiB;EACjBC;AACiB,CAAC,EAAE;EACpB,MAAM;IAAEC,WAAW;IAAEC,IAAI;IAAEC,oBAAoB;IAAEC,cAAc;IAAEC;EAAS,CAAC,GAC1EP,MAAM;;EAEP;EACA,MAAMQ,YAAY,GAAG,GAAGJ,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEK,IAAI,CAAC,CAAC,EAAE;EAEtC,MAAMC,qBAAqB,GAAGb,wBAAwB,CAACE,OAAO,CAAC;EAE/D,MAAMY,kBAAkB,GAAGjB,qBAAqB,CAACK,OAAO,CAAC;;EAEzD;EACA;;EAEA,MAAM;IAAEa,sBAAsB;IAAEC;EAA2B,CAAC,GAC3DlB,yBAAyB,CAACI,OAAO,CAAC;EAEnC,MAAMe,cAAc,GAAGf,OAAO,CAACgB,OAAO,CAACC,aAAa,CAACC,OAAO;EAE5D,MAAMC,QAAQ,GAAGC,SAAS,CAACX,YAAY,CAAC;;EAExC;EACA,MAAM;IAAEY,YAAY;IAAEC;EAAW,CAAC,GAAG,MAAMzB,mBAAmB,CAAC;IAC9De,kBAAkB;IAClBR;EACD,CAAC,CAAC;EAEFF,iBAAiB,aAAjBA,iBAAiB,eAAjBA,iBAAiB,CAAG;IACnBqB,SAAS,EAAE,IAAIC,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC;IACnCJ,YAAY;IACZC,UAAU;IACVV;EACD,CAAC,CAAC;;EAEF;EACA,MAAM;IAAEc,MAAM;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,aAAa;IAAEC;EAAU,CAAC,GAC5D,MAAMpC,gBAAgB,CAAC;IACtBW,IAAI,EAAEc,QAAQ;IACdE,YAAY;IACZV,qBAAqB;IACrBE,sBAAsB,EAAE,CAAC,GAAGA,sBAAsB,CAAC;IACnDC,0BAA0B,EAAE,CAAC,GAAGA,0BAA0B,CAAC;IAC3Dd,OAAO;IACPY,kBAAkB;IAClBJ,QAAQ;IACRL;EACD,CAAC,CAAC;EAEH,OAAO;IACNwB,OAAO;IACPG,SAAS;IACTF,QAAQ;IACRC,aAAa;IACb;IACAH,MAAM;IACNX,cAAc;IACd;IACAR,cAAc;IACd;IACAD;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isEmpty } from "radash";
|
|
2
|
-
import { addClientTagsToOfferLinks, getOffersByProductTypes
|
|
2
|
+
import { addClientTagsToOfferLinks, getOffersByProductTypes } from "../utils";
|
|
3
3
|
import { sortOffersByRecommendationScore } from "../utils/sortOffersByRecommendationScore";
|
|
4
4
|
import { pipe } from "effect";
|
|
5
5
|
import { formatOfferUrl } from "../utils/formatOfferUrl";
|
|
@@ -13,7 +13,6 @@ export const getDynamicOffers = async ({
|
|
|
13
13
|
tags,
|
|
14
14
|
defaultProductType,
|
|
15
15
|
productTypes,
|
|
16
|
-
resultType,
|
|
17
16
|
isCachedOffersRequest,
|
|
18
17
|
productTypesDefinition,
|
|
19
18
|
partnersOverrideDefinition,
|
|
@@ -57,7 +56,7 @@ export const getDynamicOffers = async ({
|
|
|
57
56
|
productTypes = [defaultProductType];
|
|
58
57
|
errorCode = fallbackResult.errorCode;
|
|
59
58
|
}
|
|
60
|
-
const sortedOffers =
|
|
59
|
+
const sortedOffers = sortOffersByRecommendationScore(offers);
|
|
61
60
|
return {
|
|
62
61
|
offers: pipe(sortedOffers, formatOfferUrl(productTypesDefinition, partnersOverrideDefinition), addClientTagsToOfferLinks(isCachedOffersRequest, tags), sortOffersByRecommendationScore),
|
|
63
62
|
isError,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isEmpty","addClientTagsToOfferLinks","getOffersByProductTypes","
|
|
1
|
+
{"version":3,"names":["isEmpty","addClientTagsToOfferLinks","getOffersByProductTypes","sortOffersByRecommendationScore","pipe","formatOfferUrl","getDynamicOffers","tags","defaultProductType","productTypes","isCachedOffersRequest","productTypesDefinition","partnersOverrideDefinition","context","userData","onError","offers","rateTableUuid","isError","leadUuid","errorCode","enablePolling","fallbackResult","sortedOffers"],"sourceRoot":"../../../src","sources":["services/getDynamicOffers.ts"],"mappings":"AAAA,SAASA,OAAO,QAAQ,QAAQ;AAChC,SAASC,yBAAyB,EAAEC,uBAAuB,QAAQ,UAAU;AAE7E,SAASC,+BAA+B,QAAQ,0CAA0C;AAC1F,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,cAAc,QAAQ,yBAAyB;AAuBxD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAG,MAAAA,CAAO;EACtCC,IAAI;EACJC,kBAAkB;EAClBC,YAAY;EACZC,qBAAqB;EACrBC,sBAAsB;EACtBC,0BAA0B;EAC1BC,OAAO;EACPC,QAAQ;EACRC;AACqC,CAAC,KAAK;EAC3C;EACA,IAAI;IAAEC,MAAM;IAAEC,aAAa;IAAEC,OAAO;IAAEC,QAAQ;IAAEC;EAAU,CAAC,GAC1D,MAAMlB,uBAAuB,CAAC;IAC7BQ,qBAAqB;IACrBD,YAAY;IACZF,IAAI;IACJM,OAAO;IACPC,QAAQ;IACRO,aAAa,EAAE,IAAI;IACnBN;EACD,CAAC,CAAC;;EAEH;EACA,IAAIf,OAAO,CAACgB,MAAM,CAAC,EAAE;IACpB,MAAMM,cAAc,GAAG,MAAMpB,uBAAuB,CAAC;MACpDQ,qBAAqB;MACrBD,YAAY,EAAE,CAACD,kBAAkB,CAAC;MAClCD,IAAI;MACJM,OAAO;MACPC,QAAQ;MACRC;IACD,CAAC,CAAC;;IAEF;IACAC,MAAM,GAAGM,cAAc,CAACN,MAAM;IAC9BC,aAAa,GAAGK,cAAc,CAACL,aAAa;IAC5CC,OAAO,GAAGI,cAAc,CAACJ,OAAO;IAChCC,QAAQ,GAAGG,cAAc,CAACH,QAAQ;IAClCV,YAAY,GAAG,CAACD,kBAAkB,CAAC;IACnCY,SAAS,GAAGE,cAAc,CAACF,SAAS;EACrC;EAEA,MAAMG,YAAY,GAAGpB,+BAA+B,CAACa,MAAM,CAAC;EAE5D,OAAO;IACNA,MAAM,EAAEZ,IAAI,CACXmB,YAAY,EACZlB,cAAc,CAACM,sBAAsB,EAAEC,0BAA0B,CAAC,EAClEX,yBAAyB,CAACS,qBAAqB,EAAEH,IAAI,CAAC,EACtDJ,+BACD,CAAC;IACDe,OAAO;IACPE,SAAS;IACTD,QAAQ,EAAEA,QAAQ;IAClBF;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return query.includes(",") ? query.split(",").map(productType => productType.trim()) : [query];
|
|
1
|
+
const parseProductTypes = productType => {
|
|
2
|
+
return productType.includes(",") ? productType.split(",").map(productTypeSlug => productTypeSlug.trim()) : [productType];
|
|
4
3
|
};
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -10,26 +9,8 @@ const parseProductTypes = query => {
|
|
|
10
9
|
*/
|
|
11
10
|
export const getProductTypes = async ({
|
|
12
11
|
productType,
|
|
13
|
-
defaultProductType
|
|
14
|
-
query,
|
|
15
|
-
searchAPIToken,
|
|
16
|
-
isDev,
|
|
17
|
-
onError
|
|
12
|
+
defaultProductType
|
|
18
13
|
}) => {
|
|
19
|
-
if (query && query.trim().length > 0) {
|
|
20
|
-
const productTypes = await getProductTypesByQuery({
|
|
21
|
-
query,
|
|
22
|
-
searchAPIToken,
|
|
23
|
-
isDev,
|
|
24
|
-
onError
|
|
25
|
-
});
|
|
26
|
-
return {
|
|
27
|
-
productTypes,
|
|
28
|
-
resultType: "QUERY"
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// TODO: Check if need to add support for productType as enf app
|
|
33
14
|
if (productType && productType.trim().length > 0) {
|
|
34
15
|
const productTypes = await parseProductTypes(productType);
|
|
35
16
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["parseProductTypes","productType","includes","split","map","productTypeSlug","trim","getProductTypes","defaultProductType","length","productTypes","resultType"],"sourceRoot":"../../../src","sources":["services/getProductTypes.ts"],"mappings":"AAYA,MAAMA,iBAAiB,GAAIC,WAAmB,IAAe;EAC5D,OAAOA,WAAW,CAACC,QAAQ,CAAC,GAAG,CAAC,GAC7BD,WAAW,CAACE,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAEC,eAAe,IAAKA,eAAe,CAACC,IAAI,CAAC,CAAC,CAAC,GACvE,CAACL,WAAW,CAAC;AACjB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMM,eAAe,GAAG,MAAAA,CAAO;EACrCN,WAAW;EACXO;AACqB,CAAC,KAAkC;EACxD,IAAIP,WAAW,IAAIA,WAAW,CAACK,IAAI,CAAC,CAAC,CAACG,MAAM,GAAG,CAAC,EAAE;IACjD,MAAMC,YAAY,GAAG,MAAMV,iBAAiB,CAACC,WAAW,CAAC;IACzD,OAAO;MAAES,YAAY;MAAEC,UAAU,EAAE;IAAe,CAAC;EACpD;EAEA,OAAO;IAAED,YAAY,EAAE,CAACF,kBAAkB,CAAC;IAAEG,UAAU,EAAE;EAAU,CAAC;AACrE,CAAC","ignoreList":[]}
|
|
@@ -3,7 +3,6 @@ export * from "./getDefaultProductType";
|
|
|
3
3
|
export * from "./getOffersByProductTypes";
|
|
4
4
|
export * from "./getProductTypesDefinition";
|
|
5
5
|
export * from "./resolveProductTypes";
|
|
6
|
-
export * from "./selectDynamicOffers";
|
|
7
6
|
export * from "./sortOffersByRecommendationScore";
|
|
8
7
|
export * from "./parseStringProductTypes";
|
|
9
8
|
export * from "./getEnableUseCachedOffers";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":"AAAA,cAAc,6BAA6B;AAC3C,cAAc,yBAAyB;AACvC,cAAc,2BAA2B;AACzC,cAAc,6BAA6B;AAC3C,cAAc,uBAAuB;AACrC,cAAc,
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":"AAAA,cAAc,6BAA6B;AAC3C,cAAc,yBAAyB;AACvC,cAAc,2BAA2B;AACzC,cAAc,6BAA6B;AAC3C,cAAc,uBAAuB;AACrC,cAAc,mCAAmC;AACjD,cAAc,2BAA2B;AACzC,cAAc,4BAA4B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getProductTypes","resolveProductTypes","props"],"sourceRoot":"../../../src","sources":["utils/resolveProductTypes.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["getProductTypes","resolveProductTypes","props"],"sourceRoot":"../../../src","sources":["utils/resolveProductTypes.ts"],"mappings":"AAAA,SAASA,eAAe,QAAyB,6BAA6B;AAO9E,OAAO,MAAMC,mBAAmB,GAAG,MAClCC,KAA+B,IAI1B;EACL,OAAO,MAAMF,eAAe,CAACE,KAAK,CAAC;AACpC,CAAC","ignoreList":[]}
|
package/lib/module/version.js
CHANGED
|
@@ -6,8 +6,4 @@ export declare const getConfigApiBaseUrl: (isDev: boolean) => string;
|
|
|
6
6
|
* Gets the base URL for the Offer Catalog API.
|
|
7
7
|
*/
|
|
8
8
|
export declare const getOfferCatalogApiBaseUrl: (isDev: boolean) => string;
|
|
9
|
-
/**
|
|
10
|
-
* Gets the base URL for the EWS Search API.
|
|
11
|
-
*/
|
|
12
|
-
export declare const getEwsSearchApiBaseUrl: (isDev: boolean) => string;
|
|
13
9
|
//# sourceMappingURL=apiEnvironment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiEnvironment.d.ts","sourceRoot":"","sources":["../../../src/apiEnvironment.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,OAAO,KAAG,MACa,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,OAAO,OAAO,KAAG,MACO,CAAC
|
|
1
|
+
{"version":3,"file":"apiEnvironment.d.ts","sourceRoot":"","sources":["../../../src/apiEnvironment.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,OAAO,KAAG,MACa,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,OAAO,OAAO,KAAG,MACO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Common/BaseOfferCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAClD,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAOrE,QAAA,MAAM,aAAa;2DAKhB,SAAS,GAAG;QAAE,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE;uCAkB1B,SAAS;+CAiFD,SAAS;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Common/BaseOfferCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAClD,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAOrE,QAAA,MAAM,aAAa;2DAKhB,SAAS,GAAG;QAAE,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE;uCAkB1B,SAAS;+CAiFD,SAAS;;iDAsIxD,cAAc,CAAC,OAAO,MAAM,CAAC;sCAnGS,SAAS;4CAUH,SAAS;;8CA1EP,SAAS;0BAalD,IAAI,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;sCAmE5B,SAAS;yCAYN,SAAS;wDAclD,SAAS,GAAG;QAAE,iBAAiB,EAAE,MAAM,EAAE,CAAA;KAAE;iFAc3C;QACF,iBAAiB,EAAE,MAAM,EAAE,CAAC;QAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;;kBA1LyB,CAAC;qBAAyB,CAAC;cAAkB,CAAC;;wBAsB7C,SAAS;6BAY5B,IAAI,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;iDAgBjB,SAAS;yCAsDjB,SAAS;yCAWT,SAAS;CA3GpD,CAAC;AAmPF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -13,9 +13,7 @@ export type MoneyLionOfferCarouselProps = {
|
|
|
13
13
|
channel: string;
|
|
14
14
|
zone: string;
|
|
15
15
|
subAccountToken: string;
|
|
16
|
-
searchAPIToken: string;
|
|
17
16
|
productType?: string;
|
|
18
|
-
query?: string;
|
|
19
17
|
tags?: string;
|
|
20
18
|
staticProductTypes?: string;
|
|
21
19
|
fontFamily?: Partial<FontFamily>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyLionOfferCarousel.d.ts","sourceRoot":"","sources":["../../../../src/components/MoneyLionOfferCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAKb,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,MAAM,OAAO,CAAC;AASf,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAEN,KAAK,uBAAuB,EAC5B,MAAM,iCAAiC,CAAC;AAGzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAExF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AAIjF,OAAO,KAAK,EAGX,uBAAuB,EACvB,eAAe,EACf,MAAM,8BAA8B,CAAC;AAItC,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,
|
|
1
|
+
{"version":3,"file":"MoneyLionOfferCarousel.d.ts","sourceRoot":"","sources":["../../../../src/components/MoneyLionOfferCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAKb,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,MAAM,OAAO,CAAC;AASf,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAEN,KAAK,uBAAuB,EAC5B,MAAM,iCAAiC,CAAC;AAGzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAExF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AAIjF,OAAO,KAAK,EAGX,uBAAuB,EACvB,eAAe,EACf,MAAM,8BAA8B,CAAC;AAItC,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACpB,GAAG,IAAI,CAAC,uBAAuB,EAAE,eAAe,GAAG,UAAU,CAAC,CAAC;AAEhE,MAAM,WAAW,mCAAoC,SAAQ,IAAI,CAChE,2BAA2B,EAC3B,YAAY,CACZ;IACA,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,GAAG,CAAC;IACd,UAAU,EAAE,QAAQ,CAAC,cAAc,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC;IACxD,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,uBAAuB,CAAC;CAClC;AA0VD,eAAO,MAAM,sBAAsB,GAClC,OAAO,2BAA2B,GACjC,IAAI,CAAC,uBAAuB,EAAE,eAAe,GAAG,UAAU,CAAC,sBA6C5D,CAAC"}
|
|
@@ -4,9 +4,7 @@ import type { InternalOnErrorCallback } from "./capabilities/errors/types";
|
|
|
4
4
|
import type { onRateTableSubmitProps } from "./context/EventHandlerProvider";
|
|
5
5
|
export type GetPageDataParams = {
|
|
6
6
|
productType?: string;
|
|
7
|
-
query?: string;
|
|
8
7
|
tags?: string;
|
|
9
|
-
searchAPIToken: string;
|
|
10
8
|
showProductTypeLabel?: boolean;
|
|
11
9
|
showCardBorder?: boolean;
|
|
12
10
|
userData?: UserData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageData.d.ts","sourceRoot":"","sources":["../../../src/pageData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAChF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAC;AACvF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"pageData.d.ts","sourceRoot":"","sources":["../../../src/pageData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAChF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAC;AACvF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAS7E,MAAM,MAAM,iBAAiB,GAAG;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACvB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,uBAAuB,CAAC;CAClC,CAAC;AAEF,wBAAsB,WAAW,CAAC,EACjC,OAAO,EACP,MAAM,EACN,iBAAiB,EACjB,OAAO,GACP,EAAE,gBAAgB;;;;;;;;;GA6DlB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GetProductTypesProps
|
|
1
|
+
import type { GetProductTypesProps } from "./getProductTypes";
|
|
2
2
|
import type { PartnerOverride, ProductTypeDefinition } from "../capabilities/offer-catalog/src";
|
|
3
3
|
import type { UserData } from "../capabilities/configuration/src/userData/types";
|
|
4
4
|
import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
|
|
@@ -6,21 +6,20 @@ import type { InternalOnErrorCallback } from "../capabilities/errors/types";
|
|
|
6
6
|
export type GetDynamicOffersProps = {
|
|
7
7
|
tags: string;
|
|
8
8
|
productTypes: string[];
|
|
9
|
-
resultType: ProductTypesResult["resultType"];
|
|
10
9
|
isCachedOffersRequest: boolean;
|
|
11
10
|
productTypesDefinition: ProductTypeDefinition[];
|
|
12
11
|
partnersOverrideDefinition: PartnerOverride[];
|
|
13
12
|
context: CnfContext;
|
|
14
13
|
userData?: UserData;
|
|
15
14
|
onError?: InternalOnErrorCallback;
|
|
16
|
-
} & Omit<GetProductTypesProps, "context" | "productTypeOrUrl" | "
|
|
15
|
+
} & Omit<GetProductTypesProps, "context" | "productTypeOrUrl" | "isDevMode" | "referrer">;
|
|
17
16
|
/**
|
|
18
17
|
* Retrieves dynamic offers based on the provided parameters.
|
|
19
18
|
*
|
|
20
19
|
* @param {GetDynamicOffersProps} params - The parameters for retrieving dynamic offers.
|
|
21
20
|
* @returns {Promise<{ productTypeDisplayName: string; offers: typeof offers }>} An object containing the product type display name and the offers.
|
|
22
21
|
*/
|
|
23
|
-
export declare const getDynamicOffers: ({ tags, defaultProductType, productTypes,
|
|
22
|
+
export declare const getDynamicOffers: ({ tags, defaultProductType, productTypes, isCachedOffersRequest, productTypesDefinition, partnersOverrideDefinition, context, userData, onError, }: Omit<GetDynamicOffersProps, "isDev">) => Promise<{
|
|
24
23
|
offers: import("../capabilities/offer-catalog/src").BaseOffer[];
|
|
25
24
|
isError: boolean | undefined;
|
|
26
25
|
errorCode: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDynamicOffers.d.ts","sourceRoot":"","sources":["../../../../src/services/getDynamicOffers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getDynamicOffers.d.ts","sourceRoot":"","sources":["../../../../src/services/getDynamicOffers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAI9D,OAAO,KAAK,EACX,eAAe,EACf,qBAAqB,EACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AACxF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,MAAM,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,0BAA0B,EAAE,eAAe,EAAE,CAAC;IAC9C,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,uBAAuB,CAAC;CAClC,GAAG,IAAI,CACP,oBAAoB,EACpB,SAAS,GAAG,kBAAkB,GAAG,WAAW,GAAG,UAAU,CACzD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAU,oJAUpC,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC;;;;;;EA+CtC,CAAC"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import type { InternalOnErrorCallback } from "../capabilities/errors/types";
|
|
2
1
|
export type GetProductTypesProps = {
|
|
3
2
|
productType?: string;
|
|
4
|
-
query?: string;
|
|
5
3
|
defaultProductType: string;
|
|
6
|
-
searchAPIToken: string;
|
|
7
|
-
isDev: boolean;
|
|
8
|
-
onError?: InternalOnErrorCallback;
|
|
9
4
|
};
|
|
10
|
-
export type ResultType = "STATIC" | "
|
|
5
|
+
export type ResultType = "STATIC" | "PRODUCT_TYPE" | "DEFAULT";
|
|
11
6
|
export type ProductTypesResult = {
|
|
12
7
|
productTypes: string[];
|
|
13
8
|
resultType: ResultType;
|
|
@@ -17,5 +12,5 @@ export type ProductTypesResult = {
|
|
|
17
12
|
* @param props - The properties to get the product types
|
|
18
13
|
* @returns The product types
|
|
19
14
|
*/
|
|
20
|
-
export declare const getProductTypes: ({ productType, defaultProductType,
|
|
15
|
+
export declare const getProductTypes: ({ productType, defaultProductType, }: GetProductTypesProps) => Promise<ProductTypesResult>;
|
|
21
16
|
//# sourceMappingURL=getProductTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProductTypes.d.ts","sourceRoot":"","sources":["../../../../src/services/getProductTypes.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"getProductTypes.d.ts","sourceRoot":"","sources":["../../../../src/services/getProductTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,cAAc,GAAG,SAAS,CAAC;AAE/D,MAAM,MAAM,kBAAkB,GAAG;IAChC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;CACvB,CAAC;AAQF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAU,sCAGnC,oBAAoB,KAAG,OAAO,CAAC,kBAAkB,CAOnD,CAAC"}
|
|
@@ -3,7 +3,6 @@ export * from "./getDefaultProductType";
|
|
|
3
3
|
export * from "./getOffersByProductTypes";
|
|
4
4
|
export * from "./getProductTypesDefinition";
|
|
5
5
|
export * from "./resolveProductTypes";
|
|
6
|
-
export * from "./selectDynamicOffers";
|
|
7
6
|
export * from "./sortOffersByRecommendationScore";
|
|
8
7
|
export * from "./parseStringProductTypes";
|
|
9
8
|
export * from "./getEnableUseCachedOffers";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import type { InternalOnErrorCallback } from "../capabilities/errors/types";
|
|
2
1
|
import { type ResultType } from "../services/getProductTypes";
|
|
3
2
|
type ResolveProductTypesProps = {
|
|
4
3
|
productType?: string;
|
|
5
|
-
query?: string;
|
|
6
4
|
defaultProductType: string;
|
|
7
|
-
searchAPIToken: string;
|
|
8
|
-
isDev: boolean;
|
|
9
|
-
onError?: InternalOnErrorCallback;
|
|
10
5
|
};
|
|
11
6
|
export declare const resolveProductTypes: (props: ResolveProductTypesProps) => Promise<{
|
|
12
7
|
productTypes: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveProductTypes.d.ts","sourceRoot":"","sources":["../../../../src/utils/resolveProductTypes.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"resolveProductTypes.d.ts","sourceRoot":"","sources":["../../../../src/utils/resolveProductTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE/E,KAAK,wBAAwB,GAAG;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC/B,OAAO,wBAAwB,KAC7B,OAAO,CAAC;IACV,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;CACvB,CAEA,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.9.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneylion/react-native-offer-carousel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "React Native components for the Engine by MoneyLion Mobile SDK",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"typecheck": "tsc --noEmit",
|
|
33
33
|
"clean": "del-cli lib",
|
|
34
34
|
"sync-version": "node scripts/sync-version.js",
|
|
35
|
-
"version": "1.8.8",
|
|
36
35
|
"prepare": "yarn sync-version && bob build"
|
|
37
36
|
},
|
|
38
37
|
"author": "",
|
|
@@ -43,14 +42,13 @@
|
|
|
43
42
|
"commitlint": "^17.0.2",
|
|
44
43
|
"del-cli": "^5.1.0",
|
|
45
44
|
"react-native-builder-bob": "^0.20.0",
|
|
46
|
-
"react-native-svg": "13.10.0",
|
|
47
45
|
"release-it": "^15.0.0",
|
|
48
46
|
"type-fest": "4.26.1"
|
|
49
47
|
},
|
|
50
48
|
"peerDependencies": {
|
|
51
49
|
"react": "*",
|
|
52
50
|
"react-native": "*",
|
|
53
|
-
"react-native-svg": "
|
|
51
|
+
"react-native-svg": ">=15.11.0 <16"
|
|
54
52
|
},
|
|
55
53
|
"commitlint": {
|
|
56
54
|
"extends": [
|
package/src/apiEnvironment.ts
CHANGED
|
@@ -9,9 +9,3 @@ export const getConfigApiBaseUrl = (isDev: boolean): string =>
|
|
|
9
9
|
*/
|
|
10
10
|
export const getOfferCatalogApiBaseUrl = (isDev: boolean): string =>
|
|
11
11
|
isDev ? "https://dev-api.engine.tech" : "https://api.engine.tech";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Gets the base URL for the EWS Search API.
|
|
15
|
-
*/
|
|
16
|
-
export const getEwsSearchApiBaseUrl = (isDev: boolean): string =>
|
|
17
|
-
isDev ? "https://api.dev-ews.engine.tech" : "https://api.ews.engine.tech";
|
|
@@ -157,8 +157,6 @@ const ProductType = ({ children, ...rest }: TextProps) => (
|
|
|
157
157
|
const ChosenBy = ({ children, ...rest }: ViewProps) => (
|
|
158
158
|
<View width={"100%"} style={styles.chosenBy} {...rest}>
|
|
159
159
|
<View direction={"row"} style={{ alignItems: "center" }}>
|
|
160
|
-
{/* TODO Check this Icon Usage and move to reeact native version of same. */}
|
|
161
|
-
{/* <Icon svg={ThumbsUpIcon} attributes={{ style: { marginRight: "4px" } }} /> */}
|
|
162
160
|
<Text variant="caption-1" weight="bold">
|
|
163
161
|
Chosen by {children}
|
|
164
162
|
</Text>
|
|
@@ -46,9 +46,7 @@ export type MoneyLionOfferCarouselProps = {
|
|
|
46
46
|
channel: string;
|
|
47
47
|
zone: string;
|
|
48
48
|
subAccountToken: string;
|
|
49
|
-
searchAPIToken: string;
|
|
50
49
|
productType?: string;
|
|
51
|
-
query?: string;
|
|
52
50
|
tags?: string;
|
|
53
51
|
staticProductTypes?: string;
|
|
54
52
|
fontFamily?: Partial<FontFamily>;
|
|
@@ -141,9 +139,7 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
141
139
|
subtitle,
|
|
142
140
|
isDarkTheme = false,
|
|
143
141
|
productType,
|
|
144
|
-
query,
|
|
145
142
|
tags,
|
|
146
|
-
searchAPIToken,
|
|
147
143
|
showProductTypeLabel: _showProductTypeLabel,
|
|
148
144
|
showCardBorder: _showCardBorder,
|
|
149
145
|
userData,
|
|
@@ -176,9 +172,7 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
176
172
|
const getPageDataParams: GetPageDataParams = useMemo(
|
|
177
173
|
() => ({
|
|
178
174
|
productType,
|
|
179
|
-
query,
|
|
180
175
|
tags,
|
|
181
|
-
searchAPIToken,
|
|
182
176
|
userData: {
|
|
183
177
|
email: userData?.email || "",
|
|
184
178
|
_mockUserCountry: userData?._mockUserCountry || "",
|
|
@@ -188,9 +182,7 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
188
182
|
}),
|
|
189
183
|
[
|
|
190
184
|
productType,
|
|
191
|
-
query,
|
|
192
185
|
tags,
|
|
193
|
-
searchAPIToken,
|
|
194
186
|
_showProductTypeLabel,
|
|
195
187
|
_showCardBorder,
|
|
196
188
|
userData?.email,
|
|
@@ -268,12 +260,11 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
268
260
|
}, [isFetchingConfig]);
|
|
269
261
|
|
|
270
262
|
useEffect(() => {
|
|
271
|
-
if (!channel || !zone || !subAccountToken
|
|
263
|
+
if (!channel || !zone || !subAccountToken) {
|
|
272
264
|
const missingParams: string[] = [];
|
|
273
265
|
if (!channel) missingParams.push("channel");
|
|
274
266
|
if (!zone) missingParams.push("zone");
|
|
275
267
|
if (!subAccountToken) missingParams.push("subAccountToken");
|
|
276
|
-
if (!searchAPIToken) missingParams.push("searchAPIToken");
|
|
277
268
|
|
|
278
269
|
onError?.({
|
|
279
270
|
code: ErrorCodes.MISSING_CONFIG,
|
|
@@ -282,7 +273,7 @@ const InternalMoneyLionOfferCarousel = (
|
|
|
282
273
|
});
|
|
283
274
|
}
|
|
284
275
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
285
|
-
}, [channel, zone, subAccountToken
|
|
276
|
+
}, [channel, zone, subAccountToken]);
|
|
286
277
|
|
|
287
278
|
useEffect(() => {
|
|
288
279
|
const fetchPageData = async () => {
|
package/src/pageData.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { UserData } from "./capabilities/configuration/src/userData/types";
|
|
2
2
|
import type { CnfContext } from "./capabilities/core/src/system/cnfContext/CnfContext";
|
|
3
3
|
import type { InternalOnErrorCallback } from "./capabilities/errors/types";
|
|
4
|
-
import { getIsDevEnvironment } from "./capabilities/offer-catalog/src/utils/contextUtil";
|
|
5
4
|
|
|
6
5
|
import type { onRateTableSubmitProps } from "./context/EventHandlerProvider";
|
|
7
6
|
import { getDynamicOffers } from "./services/getDynamicOffers";
|
|
8
|
-
// import { getDynamicOffers } from "./services/getDynamicOffers";
|
|
9
7
|
import {
|
|
10
8
|
getDefaultProductType,
|
|
11
9
|
getProductTypesDefinition,
|
|
@@ -15,9 +13,7 @@ import { getEnableUseCachedOffers } from "./utils/getEnableUseCachedOffers";
|
|
|
15
13
|
|
|
16
14
|
export type GetPageDataParams = {
|
|
17
15
|
productType?: string;
|
|
18
|
-
query?: string;
|
|
19
16
|
tags?: string;
|
|
20
|
-
searchAPIToken: string;
|
|
21
17
|
showProductTypeLabel?: boolean;
|
|
22
18
|
showCardBorder?: boolean;
|
|
23
19
|
userData?: UserData;
|
|
@@ -36,15 +32,8 @@ export async function getPageData({
|
|
|
36
32
|
onRateTableSubmit,
|
|
37
33
|
onError,
|
|
38
34
|
}: GetPageDataProps) {
|
|
39
|
-
const {
|
|
40
|
-
|
|
41
|
-
query,
|
|
42
|
-
tags,
|
|
43
|
-
searchAPIToken,
|
|
44
|
-
showProductTypeLabel,
|
|
45
|
-
showCardBorder,
|
|
46
|
-
userData,
|
|
47
|
-
} = params;
|
|
35
|
+
const { productType, tags, showProductTypeLabel, showCardBorder, userData } =
|
|
36
|
+
params;
|
|
48
37
|
|
|
49
38
|
// Resolve Tags
|
|
50
39
|
const resolvedTags = `${tags?.trim()}`;
|
|
@@ -56,8 +45,6 @@ export async function getPageData({
|
|
|
56
45
|
// TODO: Check if this is needed or if we can remove it
|
|
57
46
|
// const parsedStaticProductTypes = parseStringProductTypes(staticProductTypes);
|
|
58
47
|
|
|
59
|
-
const isDev = getIsDevEnvironment(context);
|
|
60
|
-
|
|
61
48
|
const { productTypesDefinition, partnersOverrideDefinition } =
|
|
62
49
|
getProductTypesDefinition(context);
|
|
63
50
|
|
|
@@ -69,10 +56,6 @@ export async function getPageData({
|
|
|
69
56
|
const { productTypes, resultType } = await resolveProductTypes({
|
|
70
57
|
defaultProductType,
|
|
71
58
|
productType,
|
|
72
|
-
query,
|
|
73
|
-
searchAPIToken,
|
|
74
|
-
isDev,
|
|
75
|
-
onError,
|
|
76
59
|
});
|
|
77
60
|
|
|
78
61
|
onRateTableSubmit?.({
|
|
@@ -87,7 +70,6 @@ export async function getPageData({
|
|
|
87
70
|
await getDynamicOffers({
|
|
88
71
|
tags: safeTags,
|
|
89
72
|
productTypes,
|
|
90
|
-
resultType,
|
|
91
73
|
isCachedOffersRequest,
|
|
92
74
|
productTypesDefinition: [...productTypesDefinition],
|
|
93
75
|
partnersOverrideDefinition: [...partnersOverrideDefinition],
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { isEmpty } from "radash";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
getOffersByProductTypes,
|
|
5
|
-
selectDynamicOffers,
|
|
6
|
-
} from "../utils";
|
|
7
|
-
import type {
|
|
8
|
-
GetProductTypesProps,
|
|
9
|
-
ProductTypesResult,
|
|
10
|
-
} from "./getProductTypes";
|
|
2
|
+
import { addClientTagsToOfferLinks, getOffersByProductTypes } from "../utils";
|
|
3
|
+
import type { GetProductTypesProps } from "./getProductTypes";
|
|
11
4
|
import { sortOffersByRecommendationScore } from "../utils/sortOffersByRecommendationScore";
|
|
12
5
|
import { pipe } from "effect";
|
|
13
6
|
import { formatOfferUrl } from "../utils/formatOfferUrl";
|
|
@@ -22,7 +15,6 @@ import type { InternalOnErrorCallback } from "../capabilities/errors/types";
|
|
|
22
15
|
export type GetDynamicOffersProps = {
|
|
23
16
|
tags: string;
|
|
24
17
|
productTypes: string[];
|
|
25
|
-
resultType: ProductTypesResult["resultType"];
|
|
26
18
|
isCachedOffersRequest: boolean;
|
|
27
19
|
productTypesDefinition: ProductTypeDefinition[];
|
|
28
20
|
partnersOverrideDefinition: PartnerOverride[];
|
|
@@ -31,12 +23,7 @@ export type GetDynamicOffersProps = {
|
|
|
31
23
|
onError?: InternalOnErrorCallback;
|
|
32
24
|
} & Omit<
|
|
33
25
|
GetProductTypesProps,
|
|
34
|
-
| "
|
|
35
|
-
| "productTypeOrUrl"
|
|
36
|
-
| "query"
|
|
37
|
-
| "isDevMode"
|
|
38
|
-
| "referrer"
|
|
39
|
-
| "searchAPIToken"
|
|
26
|
+
"context" | "productTypeOrUrl" | "isDevMode" | "referrer"
|
|
40
27
|
>;
|
|
41
28
|
|
|
42
29
|
/**
|
|
@@ -49,7 +36,6 @@ export const getDynamicOffers = async ({
|
|
|
49
36
|
tags,
|
|
50
37
|
defaultProductType,
|
|
51
38
|
productTypes,
|
|
52
|
-
resultType,
|
|
53
39
|
isCachedOffersRequest,
|
|
54
40
|
productTypesDefinition,
|
|
55
41
|
partnersOverrideDefinition,
|
|
@@ -89,10 +75,7 @@ export const getDynamicOffers = async ({
|
|
|
89
75
|
errorCode = fallbackResult.errorCode;
|
|
90
76
|
}
|
|
91
77
|
|
|
92
|
-
const sortedOffers =
|
|
93
|
-
resultType === "QUERY"
|
|
94
|
-
? selectDynamicOffers(offers, productTypes)
|
|
95
|
-
: sortOffersByRecommendationScore(offers);
|
|
78
|
+
const sortedOffers = sortOffersByRecommendationScore(offers);
|
|
96
79
|
|
|
97
80
|
return {
|
|
98
81
|
offers: pipe(
|